Re: [1/2] logging-log4j2 git commit: Fixed concurrency issue affecting all layouts except PatternLayout and GelfLayout, which caused scrambled output and exceptions when logging synchronously from mul

2017-01-09 Thread Remko Popma
Sorry. I haven't been able to fix this. 
It passes on my Windows machine. 

It has something to do with the path of the log file, I don't understand why 
target/test-json-layout.log can't be found on unix systems... 
I'm thinking to just comment out that part of the test...

Sent from my iPhone

> On Jan 10, 2017, at 13:42, Apache  wrote:
> 
> ConcurrentLoggingWithJsonLayoutTest is failing for me. I don’t understand why.
> 
> 2017-01-09 21:41:06,174 main DEBUG Starting 
> LoggerContext[name=org.apache.logging.log4j.core.layout.ConcurrentLoggingWithJsonLayoutTest]
>  from configuration at log4j2-json-layout.xml
> 2017-01-09 21:41:06,176 main DEBUG Starting 
> LoggerContext[name=org.apache.logging.log4j.core.layout.ConcurrentLoggingWithJsonLayoutTest,
>  org.apache.logging.log4j.core.LoggerContext@14acaea5] with configuration 
> XmlConfiguration[location=/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml]...
> 2017-01-09 21:41:06,177 main DEBUG Shutdown hook enabled. Registering a new 
> one.
> 2017-01-09 21:41:06,187 main DEBUG Initializing configuration 
> XmlConfiguration[location=/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml]
> 2017-01-09 21:41:06,193 main DEBUG Installed script engines
> 2017-01-09 21:41:06,208 main DEBUG Groovy Scripting Engine Version: 2.0, 
> Language: Groovy, Threading: MULTITHREADED, Compile: true, Names: {groovy, 
> Groovy}
> 2017-01-09 21:41:06,499 main DEBUG Oracle Nashorn Version: 1.8.0_65, 
> Language: ECMAScript, Threading: Not Thread Safe, Compile: true, Names: 
> {nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript}
> 2017-01-09 21:41:06,538 main DEBUG BeanShell Engine Version: 1.0, Language: 
> BeanShell, Threading: MULTITHREADED, Compile: true, Names: {beanshell, bsh, 
> java}
> 2017-01-09 21:41:06,539 main DEBUG PluginManager 'Core' found 121 plugins
> 2017-01-09 21:41:06,539 main DEBUG PluginManager 'Level' found 1 plugins
> 2017-01-09 21:41:06,543 main DEBUG PluginManager 'Lookup' found 13 plugins
> 2017-01-09 21:41:06,545 main DEBUG Building Plugin[name=layout, 
> class=org.apache.logging.log4j.core.layout.JsonLayout].
> 2017-01-09 21:41:06,556 main DEBUG PluginManager 'TypeConverter' found 26 
> plugins
> 2017-01-09 21:41:06,575 main DEBUG JsonLayout$Builder(locationInfo="null", 
> properties="null", propertiesAsList="null", includeStacktrace="null", 
> eventEol="true", compact="true", complete="null", charset="null", 
> footerSerializer=null, headerSerializer=null, 
> Configuration(/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml),
>  footer="null", header="null")
> 2017-01-09 21:41:06,710 main DEBUG PluginManager 'Converter' found 41 plugins
> 2017-01-09 21:41:06,710 main DEBUG Building Plugin[name=appender, 
> class=org.apache.logging.log4j.core.appender.FileAppender].
> 2017-01-09 21:41:06,718 main DEBUG 
> FileAppender$Builder(fileName="target/test-json-layout.log", append="false", 
> locking="null", advertise="null", advertiseUri="null", createOnDemand="null", 
> bufferedIo="null", bufferSize="null", immediateFlush="null", 
> ignoreExceptions="false", 
> JsonLayout(org.apache.logging.log4j.core.layout.JsonLayout@37654521), 
> name="stdout", 
> Configuration(/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml),
>  Filter=null)
> 2017-01-09 21:41:06,719 main DEBUG Starting FileManager 
> target/test-json-layout.log
> 2017-01-09 21:41:06,720 main DEBUG Building Plugin[name=appenders, 
> class=org.apache.logging.log4j.core.config.AppendersPlugin].
> 2017-01-09 21:41:06,721 main DEBUG createAppenders(={stdout})
> 2017-01-09 21:41:06,722 main DEBUG Building Plugin[name=AppenderRef, 
> class=org.apache.logging.log4j.core.config.AppenderRef].
> 2017-01-09 21:41:06,725 main DEBUG createAppenderRef(ref="stdout", 
> level="null", Filter=null)
> 2017-01-09 21:41:06,726 main DEBUG Building Plugin[name=root, 
> class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].
> 2017-01-09 21:41:06,727 main DEBUG createLogger(additivity="null", 
> level="INFO", includeLocation="null", ={stdout}, ={}, 
> Configuration(/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml),
>  Filter=null)
> 2017-01-09 21:41:06,729 main DEBUG Building Plugin[name=loggers, 
> class=org.apache.logging.log4j.core.config.LoggersPlugin].
> 2017-01-09 21:41:06,729 main DEBUG createLoggers(={root})
> 2017-01-09 21:41:06,730 main DEBUG Configuration 
> XmlConfiguration[location=/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml]
>  initialized
> 2017-01-09 21:41:06,730 main DEBUG Starting configuration 
> 

Re: [1/2] logging-log4j2 git commit: Fixed concurrency issue affecting all layouts except PatternLayout and GelfLayout, which caused scrambled output and exceptions when logging synchronously from mul

2017-01-09 Thread Apache
ConcurrentLoggingWithJsonLayoutTest is failing for me. I don’t understand why.

2017-01-09 21:41:06,174 main DEBUG Starting 
LoggerContext[name=org.apache.logging.log4j.core.layout.ConcurrentLoggingWithJsonLayoutTest]
 from configuration at log4j2-json-layout.xml
2017-01-09 21:41:06,176 main DEBUG Starting 
LoggerContext[name=org.apache.logging.log4j.core.layout.ConcurrentLoggingWithJsonLayoutTest,
 org.apache.logging.log4j.core.LoggerContext@14acaea5] with configuration 
XmlConfiguration[location=/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml]...
2017-01-09 21:41:06,177 main DEBUG Shutdown hook enabled. Registering a new one.
2017-01-09 21:41:06,187 main DEBUG Initializing configuration 
XmlConfiguration[location=/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml]
2017-01-09 21:41:06,193 main DEBUG Installed script engines
2017-01-09 21:41:06,208 main DEBUG Groovy Scripting Engine Version: 2.0, 
Language: Groovy, Threading: MULTITHREADED, Compile: true, Names: {groovy, 
Groovy}
2017-01-09 21:41:06,499 main DEBUG Oracle Nashorn Version: 1.8.0_65, Language: 
ECMAScript, Threading: Not Thread Safe, Compile: true, Names: {nashorn, 
Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript}
2017-01-09 21:41:06,538 main DEBUG BeanShell Engine Version: 1.0, Language: 
BeanShell, Threading: MULTITHREADED, Compile: true, Names: {beanshell, bsh, 
java}
2017-01-09 21:41:06,539 main DEBUG PluginManager 'Core' found 121 plugins
2017-01-09 21:41:06,539 main DEBUG PluginManager 'Level' found 1 plugins
2017-01-09 21:41:06,543 main DEBUG PluginManager 'Lookup' found 13 plugins
2017-01-09 21:41:06,545 main DEBUG Building Plugin[name=layout, 
class=org.apache.logging.log4j.core.layout.JsonLayout].
2017-01-09 21:41:06,556 main DEBUG PluginManager 'TypeConverter' found 26 
plugins
2017-01-09 21:41:06,575 main DEBUG JsonLayout$Builder(locationInfo="null", 
properties="null", propertiesAsList="null", includeStacktrace="null", 
eventEol="true", compact="true", complete="null", charset="null", 
footerSerializer=null, headerSerializer=null, 
Configuration(/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml),
 footer="null", header="null")
2017-01-09 21:41:06,710 main DEBUG PluginManager 'Converter' found 41 plugins
2017-01-09 21:41:06,710 main DEBUG Building Plugin[name=appender, 
class=org.apache.logging.log4j.core.appender.FileAppender].
2017-01-09 21:41:06,718 main DEBUG 
FileAppender$Builder(fileName="target/test-json-layout.log", append="false", 
locking="null", advertise="null", advertiseUri="null", createOnDemand="null", 
bufferedIo="null", bufferSize="null", immediateFlush="null", 
ignoreExceptions="false", 
JsonLayout(org.apache.logging.log4j.core.layout.JsonLayout@37654521), 
name="stdout", 
Configuration(/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml),
 Filter=null)
2017-01-09 21:41:06,719 main DEBUG Starting FileManager 
target/test-json-layout.log
2017-01-09 21:41:06,720 main DEBUG Building Plugin[name=appenders, 
class=org.apache.logging.log4j.core.config.AppendersPlugin].
2017-01-09 21:41:06,721 main DEBUG createAppenders(={stdout})
2017-01-09 21:41:06,722 main DEBUG Building Plugin[name=AppenderRef, 
class=org.apache.logging.log4j.core.config.AppenderRef].
2017-01-09 21:41:06,725 main DEBUG createAppenderRef(ref="stdout", 
level="null", Filter=null)
2017-01-09 21:41:06,726 main DEBUG Building Plugin[name=root, 
class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].
2017-01-09 21:41:06,727 main DEBUG createLogger(additivity="null", 
level="INFO", includeLocation="null", ={stdout}, ={}, 
Configuration(/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml),
 Filter=null)
2017-01-09 21:41:06,729 main DEBUG Building Plugin[name=loggers, 
class=org.apache.logging.log4j.core.config.LoggersPlugin].
2017-01-09 21:41:06,729 main DEBUG createLoggers(={root})
2017-01-09 21:41:06,730 main DEBUG Configuration 
XmlConfiguration[location=/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml]
 initialized
2017-01-09 21:41:06,730 main DEBUG Starting configuration 
XmlConfiguration[location=/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml]
2017-01-09 21:41:06,731 main DEBUG Started configuration 
XmlConfiguration[location=/Users/rgoers/projects/apache/logging/log4j/log4j2/current/log4j-core/target/test-classes/log4j2-json-layout.xml]
 OK.
2017-01-09 21:41:06,732 main DEBUG Shutting down OutputStreamManager 
SYSTEM_OUT.false.false-1
2017-01-09 21:41:06,732 main DEBUG Shut down OutputStreamManager 
SYSTEM_OUT.false.false-1, all resources released: true
2017-01-09 21:41:06,732 main DEBUG 

Jenkins build is still unstable: Log4j 2.x #2592

2017-01-09 Thread Apache Jenkins Server
See 


-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1776) log4j-boot pom modules for dependency management

2017-01-09 Thread Matt Sicker (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Sicker updated LOG4J2-1776:

Description: 
This is the main feature for the Log4j Boot epic (LOG4J2-1775).

{code}
groupId: org.apache.logging.log4j.boot
artifactId: log4j-boot-*
{code}

* core: just log4j-core basically
* async (for AsyncLogger; brings in LMAX disruptor)
* log4j-spi: log4j-slf4j-impl, log4j-jul, log4j-jcl, log4j-1.2-api
* slf4j-spi: slf4j-impl, jcl-over-slf4j, jul-to-slf4j (same dependency set as 
spring-boot-starter-log4j2)
* logback (for log4j-to-slf4j, slf4j-spi, logback; this helps aid migration to 
log4j-api and promotes it as a general use logging API)
* advertiser-jmdns
* appender-async-conversant
* appender-async-jctools
* appender-cassandra
* appender-couchdb
* appender-jms
* appender-jpa
* appender-kafka
* appender-mongodb
* appender-smtp
* appender-zeromq
* config-json
* config-yaml
* layout-csv
* layout-jansi (for windows users and coloured log messages)
* layout-json (unless this has been ported to not require jackson anymore?)
* layout-xml
* layout-yaml
* script-groovy

I may have missed a few, but the base set of starters should at least 
correspond to all optional dependencies in log4j-core or the addon modules. For 
the jms, jpa, and smtp (log4j-core) appenders, we could either make add in a 
default provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) or 
split those into provider-specific starters.

  was:
This is the main feature for the Log4j Boot epic (LOG4J2-1775).

{code}
groupId: org.apache.logging.log4j.boot
artifactId: log4j-boot-*
{code}

* core: just log4j-core basically
* async (for AsyncLogger; brings in LMAX disruptor)
* log4j-spi: log4j-slf4j-impl, log4j-jul, log4j-jcl, log4j-1.2-api
* slf4j-spi: slf4j-impl, jcl-over-slf4j, jul-to-slf4j (same dependency set as 
spring-boot-starter-log4j2)
* logback (for log4j-to-slf4j, slf4j-spi, logback; this helps aid migration to 
log4j-api and promotes it as a general use logging API)
* appender-async-conversant
* appender-async-jctools
* appender-cassandra
* appender-couchdb
* appender-jms
* appender-jpa
* appender-kafka
* appender-mongodb
* appender-smtp
* appender-zeromq
* config-json
* config-yaml
* layout-csv
* layout-jansi (for windows users and coloured log messages)
* layout-json (unless this has been ported to not require jackson anymore?)
* layout-xml
* layout-yaml
* script-groovy

I may have missed a few, but the base set of starters should at least 
correspond to all optional dependencies in log4j-core or the addon modules. For 
the jms, jpa, and smtp (log4j-core) appenders, we could either make add in a 
default provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) or 
split those into provider-specific starters.


> log4j-boot pom modules for dependency management
> 
>
> Key: LOG4J2-1776
> URL: https://issues.apache.org/jira/browse/LOG4J2-1776
> Project: Log4j 2
>  Issue Type: New Feature
>  Components: Boot
>Reporter: Matt Sicker
>
> This is the main feature for the Log4j Boot epic (LOG4J2-1775).
> {code}
> groupId: org.apache.logging.log4j.boot
> artifactId: log4j-boot-*
> {code}
> * core: just log4j-core basically
> * async (for AsyncLogger; brings in LMAX disruptor)
> * log4j-spi: log4j-slf4j-impl, log4j-jul, log4j-jcl, log4j-1.2-api
> * slf4j-spi: slf4j-impl, jcl-over-slf4j, jul-to-slf4j (same dependency set as 
> spring-boot-starter-log4j2)
> * logback (for log4j-to-slf4j, slf4j-spi, logback; this helps aid migration 
> to log4j-api and promotes it as a general use logging API)
> * advertiser-jmdns
> * appender-async-conversant
> * appender-async-jctools
> * appender-cassandra
> * appender-couchdb
> * appender-jms
> * appender-jpa
> * appender-kafka
> * appender-mongodb
> * appender-smtp
> * appender-zeromq
> * config-json
> * config-yaml
> * layout-csv
> * layout-jansi (for windows users and coloured log messages)
> * layout-json (unless this has been ported to not require jackson anymore?)
> * layout-xml
> * layout-yaml
> * script-groovy
> I may have missed a few, but the base set of starters should at least 
> correspond to all optional dependencies in log4j-core or the addon modules. 
> For the jms, jpa, and smtp (log4j-core) appenders, we could either make add 
> in a default provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) 
> or split those into provider-specific starters.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



Re: Log4j Boot

2017-01-09 Thread Matt Sicker
Ok, I think it would've been annoying to match the version numbers.
However, each version of Log4j Boot will need to be released with updated
versions of Log4j anyways.

On 9 January 2017 at 21:45, Apache  wrote:

> Please don’t try to match the Log4j version numbers. That would mean we
> would have to release them along with each Log4j release, which probably
> won’t be necessary.
>
> I would make the first release -beta, unless you think the first 1.0
> release will be where it needs to be.
>
> Ralph
>
> On Jan 9, 2017, at 8:39 PM, Matt Sicker  wrote:
>
> So I'm going to go with this name as it's pretty self-explanatory what
> it's for.
>
> https://git-wip-us.apache.org/repos/asf/logging-log4j-boot.git
>
> Quick question: should these version numbers match the log4j versions? Or
> can this follow its own versioning scheme starting with 1.0?
>
> --
> Matt Sicker 
>
>
>


-- 
Matt Sicker 


Re: Log4j Boot

2017-01-09 Thread Apache
Please don’t try to match the Log4j version numbers. That would mean we would 
have to release them along with each Log4j release, which probably won’t be 
necessary.

I would make the first release -beta, unless you think the first 1.0 release 
will be where it needs to be.

Ralph

> On Jan 9, 2017, at 8:39 PM, Matt Sicker  wrote:
> 
> So I'm going to go with this name as it's pretty self-explanatory what it's 
> for.
> 
> https://git-wip-us.apache.org/repos/asf/logging-log4j-boot.git 
> 
> 
> Quick question: should these version numbers match the log4j versions? Or can 
> this follow its own versioning scheme starting with 1.0?
> 
> -- 
> Matt Sicker >



Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Matt Sicker
Oh, I totally forgot about OpenDNS. I thought they did redirects, too.

On 9 January 2017 at 21:37, Apache  wrote:

> OK. I called Cox and they gave me the ip addresses that don’t redirect but
> I was still getting their ipv6 DNS that does. I had to set that to go to
> OpenDNS instead (see https://www.opendns.com/about/innovations/ipv6/).
> Now the test passes.
>
> Ralph
>
> On Jan 9, 2017, at 7:43 PM, Matt Sicker  wrote:
>
> I'm trying an invalid IP address instead. If that still doesn't work, then
> I'll add an Assume.assumeThat() to the test so it's ignored with weird DNS
> servers.
>
> A lot of people like 8.8.8.8 (Google) and 4.2.2.2 (Level3) for DNS.
> There's also 75.75.75.75 which is Comcast (or 2001:558:feed::1 which is
> their IPv6 version apparently).
>
> On 9 January 2017 at 20:39, Apache  wrote:
>
>> It appears I need to use a different DNS server for it to stop
>> redirecting me. I need to figure out which one to use.
>>
>> Ralph
>>
>> On Jan 9, 2017, at 7:34 PM, Apache  wrote:
>>
>>
>> Didn’t run the test. Don’t really have to.
>>
>> nslookup "#$%^&*(*&^%$"
>> Server: 2001:578:3f::30
>> Address: 2001:578:3f::30#53
>>
>> Non-authoritative answer:
>> Name: #\$%^&*\(*&^%\$
>> Address: 92.242.140.2
>>
>>
>> Ralph
>>
>>
>>
>> On Jan 9, 2017, at 7:31 PM, Matt Sicker  wrote:
>>
>> Let me know if my updated test still causes issues.
>>
>> On 9 January 2017 at 20:30, Apache  wrote:
>>
>>> I suspect this is my ISP at work.  When I enter an invalid domain I get
>>> a web site from cox.net saying it can’t find the domain and it offers
>>> suggestions for other sites.
>>>
>>> I think this test has to be removed.
>>>
>>> Ralph
>>>
>>> On Jan 9, 2017, at 7:28 PM, Matt Sicker  wrote:
>>>
>>> Well technically a UUID can be a valid hostname itself besides being
>>> interpreted as a hex-encoded IP address (if the rest of it gets chopped
>>> off). I've updated the test to use a jumble of invalid hostname characters
>>> instead.
>>>
>>> On 9 January 2017 at 20:26, Apache  wrote:
>>>
 nslookup dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
 Server: 2001:578:3f::30
 Address: 2001:578:3f::30#53

 Non-authoritative answer:
 Name: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
 Address: 92.242.140.2



 On Jan 9, 2017, at 7:24 PM, Matt Sicker  wrote:

 I suppose technically the first part of a UUID can be an IPv4 address
 encoded in hex. I'll make a better invalid value.

 On 9 January 2017 at 20:20, Apache  wrote:

> Debugging this and InetAddress.getByName is returning an InetAddress
> object. The value is
> Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
> Address: 92.242.140.2
>
> Ralph
>
> On Jan 9, 2017, at 7:12 PM, Matt Sicker  wrote:
>
> Not sure how that's possible, but I added a better assert message. Let
> me know if you're still having an issue with it. Is it a failure from
> IntelliJ or Maven?
>
> On 9 January 2017 at 19:47, Apache  wrote:
>
>> This commit appears to be failing for me. The testInvalidIpAddress
>> method is failing on the assert.
>>
>> Ralph
>>
>> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org wrote:
>> >
>> > Repository: logging-log4j2
>> > Updated Branches:
>> >  refs/heads/master 367d26b09 -> 4254e2558
>> >
>> >
>> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
>> >
>> >
>> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
>> > Commit: http://git-wip-us.apache.org/r
>> epos/asf/logging-log4j2/commit/4254e255
>> > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4
>> 254e255
>> > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4
>> 254e255
>> >
>> > Branch: refs/heads/master
>> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
>> > Parents: 367d26b
>> > Author: Matt Sicker 
>> > Authored: Fri Dec 30 15:00:17 2016 -0600
>> > Committer: Matt Sicker 
>> > Committed: Fri Dec 30 15:01:26 2016 -0600
>> >
>> > 
>> --
>> > .../config/plugins/convert/TypeConverters.java  | 13 +++-
>> > .../validation/constraints/ValidHost.java   | 41 +++
>> > .../validation/constraints/ValidPort.java   | 44 
>> > .../validators/ValidHostValidator.java  | 58
>> +++
>> > .../validators/ValidPortValidator.java  | 53 ++
>> > .../config/plugins/validation/HostAndPort.java  | 46 
>> > 

Log4j Boot

2017-01-09 Thread Matt Sicker
So I'm going to go with this name as it's pretty self-explanatory what it's
for.

https://git-wip-us.apache.org/repos/asf/logging-log4j-boot.git

Quick question: should these version numbers match the log4j versions? Or
can this follow its own versioning scheme starting with 1.0?

-- 
Matt Sicker 


Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Apache
OK. I called Cox and they gave me the ip addresses that don’t redirect but I 
was still getting their ipv6 DNS that does. I had to set that to go to OpenDNS 
instead (see https://www.opendns.com/about/innovations/ipv6/ 
). Now the test passes.

Ralph

> On Jan 9, 2017, at 7:43 PM, Matt Sicker  wrote:
> 
> I'm trying an invalid IP address instead. If that still doesn't work, then 
> I'll add an Assume.assumeThat() to the test so it's ignored with weird DNS 
> servers.
> 
> A lot of people like 8.8.8.8 (Google) and 4.2.2.2 (Level3) for DNS. There's 
> also 75.75.75.75 which is Comcast (or 2001:558:feed::1 which is their IPv6 
> version apparently).
> 
> On 9 January 2017 at 20:39, Apache  > wrote:
> It appears I need to use a different DNS server for it to stop redirecting 
> me. I need to figure out which one to use.
> 
> Ralph
> 
>> On Jan 9, 2017, at 7:34 PM, Apache > > wrote:
>> 
>> 
>> Didn’t run the test. Don’t really have to.
>> 
>> nslookup "#$%^&*(*&^%$"
>> Server:  2001:578:3f::30
>> Address: 2001:578:3f::30#53
>> 
>> Non-authoritative answer:
>> Name:#\$%^&*\(*&^%\$
>> Address: 92.242.140.2
>> 
>> 
>> Ralph
>> 
>> 
>> 
>>> On Jan 9, 2017, at 7:31 PM, Matt Sicker >> > wrote:
>>> 
>>> Let me know if my updated test still causes issues.
>>> 
>>> On 9 January 2017 at 20:30, Apache >> > wrote:
>>> I suspect this is my ISP at work.  When I enter an invalid domain I get a 
>>> web site from cox.net  saying it can’t find the domain and 
>>> it offers suggestions for other sites.
>>> 
>>> I think this test has to be removed.
>>> 
>>> Ralph
>>> 
 On Jan 9, 2017, at 7:28 PM, Matt Sicker > wrote:
 
 Well technically a UUID can be a valid hostname itself besides being 
 interpreted as a hex-encoded IP address (if the rest of it gets chopped 
 off). I've updated the test to use a jumble of invalid hostname characters 
 instead.
 
 On 9 January 2017 at 20:26, Apache > wrote:
 nslookup dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
 Server:2001:578:3f::30
 Address:   2001:578:3f::30#53
 
 Non-authoritative answer:
 Name:  dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
 Address: 92.242.140.2
 
 
 
> On Jan 9, 2017, at 7:24 PM, Matt Sicker  > wrote:
> 
> I suppose technically the first part of a UUID can be an IPv4 address 
> encoded in hex. I'll make a better invalid value.
> 
> On 9 January 2017 at 20:20, Apache  > wrote:
> Debugging this and InetAddress.getByName is returning an InetAddress 
> object. The value is
> Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
> Address: 92.242.140.2
> 
> Ralph
> 
>> On Jan 9, 2017, at 7:12 PM, Matt Sicker > > wrote:
>> 
>> Not sure how that's possible, but I added a better assert message. Let 
>> me know if you're still having an issue with it. Is it a failure from 
>> IntelliJ or Maven?
>> 
>> On 9 January 2017 at 19:47, Apache > > wrote:
>> This commit appears to be failing for me. The testInvalidIpAddress 
>> method is failing on the assert.
>> 
>> Ralph
>> 
>> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org 
>> >  wrote:
>> >
>> > Repository: logging-log4j2
>> > Updated Branches:
>> >  refs/heads/master 367d26b09 -> 4254e2558
>> >
>> >
>> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
>> >
>> >
>> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo 
>> > 
>> > Commit: 
>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4254e255 
>> > 
>> > Tree: 
>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4254e255 
>> > 
>> > Diff: 
>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4254e255 
>> > 
>> >
>> > Branch: refs/heads/master
>> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
>> > Parents: 367d26b
>> > Author: Matt Sicker 

[jira] [Closed] (LOG4J2-1778) Add logging-log4j-boot git repo

2017-01-09 Thread Matt Sicker (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Sicker closed LOG4J2-1778.
---
Resolution: Fixed

https://git-wip-us.apache.org/repos/asf/logging-log4j-boot.git

> Add logging-log4j-boot git repo
> ---
>
> Key: LOG4J2-1778
> URL: https://issues.apache.org/jira/browse/LOG4J2-1778
> Project: Log4j 2
>  Issue Type: New Git Repo
>  Components: Boot
>Reporter: Matt Sicker
>Assignee: Matt Sicker
>
> Create a new git repository to host Log4j Boot.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



Jenkins build is still unstable: Log4j 2.x #2591

2017-01-09 Thread Apache Jenkins Server
See 


-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1777) Add JUnit categories to integration tests for use in log4j-boot module test suites

2017-01-09 Thread Matt Sicker (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Sicker updated LOG4J2-1777:

Description: Add JUnit {{@Category}} 
[annotations|https://github.com/junit-team/junit4/wiki/Categories] to the 
various integration tests that correspond to Log4j Boot modules. Also add test 
suites to log4j-boot modules themselves to run those tests as part of their 
build.  (was: Add JUnit {{@Category}} 
[annotations|https://github.com/junit-team/junit4/wiki/Categories] to the 
various integration tests that correspond to Log4j Starter modules. Also add 
test suites to log4j-starter modules themselves to run those tests as part of 
their build.)

> Add JUnit categories to integration tests for use in log4j-boot module test 
> suites
> --
>
> Key: LOG4J2-1777
> URL: https://issues.apache.org/jira/browse/LOG4J2-1777
> Project: Log4j 2
>  Issue Type: Test
>  Components: Boot
>Reporter: Matt Sicker
>Assignee: Matt Sicker
>
> Add JUnit {{@Category}} 
> [annotations|https://github.com/junit-team/junit4/wiki/Categories] to the 
> various integration tests that correspond to Log4j Boot modules. Also add 
> test suites to log4j-boot modules themselves to run those tests as part of 
> their build.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Matt Sicker
I'm trying an invalid IP address instead. If that still doesn't work, then
I'll add an Assume.assumeThat() to the test so it's ignored with weird DNS
servers.

A lot of people like 8.8.8.8 (Google) and 4.2.2.2 (Level3) for DNS. There's
also 75.75.75.75 which is Comcast (or 2001:558:feed::1 which is their IPv6
version apparently).

On 9 January 2017 at 20:39, Apache  wrote:

> It appears I need to use a different DNS server for it to stop redirecting
> me. I need to figure out which one to use.
>
> Ralph
>
> On Jan 9, 2017, at 7:34 PM, Apache  wrote:
>
>
> Didn’t run the test. Don’t really have to.
>
> nslookup "#$%^&*(*&^%$"
> Server: 2001:578:3f::30
> Address: 2001:578:3f::30#53
>
> Non-authoritative answer:
> Name: #\$%^&*\(*&^%\$
> Address: 92.242.140.2
>
>
> Ralph
>
>
>
> On Jan 9, 2017, at 7:31 PM, Matt Sicker  wrote:
>
> Let me know if my updated test still causes issues.
>
> On 9 January 2017 at 20:30, Apache  wrote:
>
>> I suspect this is my ISP at work.  When I enter an invalid domain I get a
>> web site from cox.net saying it can’t find the domain and it offers
>> suggestions for other sites.
>>
>> I think this test has to be removed.
>>
>> Ralph
>>
>> On Jan 9, 2017, at 7:28 PM, Matt Sicker  wrote:
>>
>> Well technically a UUID can be a valid hostname itself besides being
>> interpreted as a hex-encoded IP address (if the rest of it gets chopped
>> off). I've updated the test to use a jumble of invalid hostname characters
>> instead.
>>
>> On 9 January 2017 at 20:26, Apache  wrote:
>>
>>> nslookup dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>>> Server: 2001:578:3f::30
>>> Address: 2001:578:3f::30#53
>>>
>>> Non-authoritative answer:
>>> Name: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>>> Address: 92.242.140.2
>>>
>>>
>>>
>>> On Jan 9, 2017, at 7:24 PM, Matt Sicker  wrote:
>>>
>>> I suppose technically the first part of a UUID can be an IPv4 address
>>> encoded in hex. I'll make a better invalid value.
>>>
>>> On 9 January 2017 at 20:20, Apache  wrote:
>>>
 Debugging this and InetAddress.getByName is returning an InetAddress
 object. The value is
 Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
 Address: 92.242.140.2

 Ralph

 On Jan 9, 2017, at 7:12 PM, Matt Sicker  wrote:

 Not sure how that's possible, but I added a better assert message. Let
 me know if you're still having an issue with it. Is it a failure from
 IntelliJ or Maven?

 On 9 January 2017 at 19:47, Apache  wrote:

> This commit appears to be failing for me. The testInvalidIpAddress
> method is failing on the assert.
>
> Ralph
>
> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org wrote:
> >
> > Repository: logging-log4j2
> > Updated Branches:
> >  refs/heads/master 367d26b09 -> 4254e2558
> >
> >
> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
> >
> >
> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
> > Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit
> /4254e255
> > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4
> 254e255
> > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4
> 254e255
> >
> > Branch: refs/heads/master
> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
> > Parents: 367d26b
> > Author: Matt Sicker 
> > Authored: Fri Dec 30 15:00:17 2016 -0600
> > Committer: Matt Sicker 
> > Committed: Fri Dec 30 15:01:26 2016 -0600
> >
> > 
> --
> > .../config/plugins/convert/TypeConverters.java  | 13 +++-
> > .../validation/constraints/ValidHost.java   | 41 +++
> > .../validation/constraints/ValidPort.java   | 44 
> > .../validators/ValidHostValidator.java  | 58 +++
> > .../validators/ValidPortValidator.java  | 53 ++
> > .../config/plugins/validation/HostAndPort.java  | 46 
> > .../validators/ValidHostValidatorTest.java  | 74
> 
> > .../validators/ValidPortValidatorTest.java  | 70
> ++
> > src/changes/changes.xml |  3 +
> > 9 files changed, 401 insertions(+), 1 deletion(-)
> > 
> --
> >
> >
> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4
> 254e255/log4j-core/src/main/java/org/apache/logging/log4j/co
> re/config/plugins/convert/TypeConverters.java
> > 

[jira] [Updated] (LOG4J2-1777) Add JUnit categories to integration tests for use in log4j-boot module test suites

2017-01-09 Thread Matt Sicker (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Sicker updated LOG4J2-1777:

Summary: Add JUnit categories to integration tests for use in log4j-boot 
module test suites  (was: Add JUnit categories to integration tests for use in 
log4j-starter module test suites)

> Add JUnit categories to integration tests for use in log4j-boot module test 
> suites
> --
>
> Key: LOG4J2-1777
> URL: https://issues.apache.org/jira/browse/LOG4J2-1777
> Project: Log4j 2
>  Issue Type: Test
>  Components: Boot
>Reporter: Matt Sicker
>Assignee: Matt Sicker
>
> Add JUnit {{@Category}} 
> [annotations|https://github.com/junit-team/junit4/wiki/Categories] to the 
> various integration tests that correspond to Log4j Starter modules. Also add 
> test suites to log4j-starter modules themselves to run those tests as part of 
> their build.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Apache
It appears I need to use a different DNS server for it to stop redirecting me. 
I need to figure out which one to use.

Ralph

> On Jan 9, 2017, at 7:34 PM, Apache  wrote:
> 
> 
> Didn’t run the test. Don’t really have to.
> 
> nslookup "#$%^&*(*&^%$"
> Server:   2001:578:3f::30
> Address:  2001:578:3f::30#53
> 
> Non-authoritative answer:
> Name: #\$%^&*\(*&^%\$
> Address: 92.242.140.2
> 
> 
> Ralph
> 
> 
> 
>> On Jan 9, 2017, at 7:31 PM, Matt Sicker > > wrote:
>> 
>> Let me know if my updated test still causes issues.
>> 
>> On 9 January 2017 at 20:30, Apache > > wrote:
>> I suspect this is my ISP at work.  When I enter an invalid domain I get a 
>> web site from cox.net  saying it can’t find the domain and 
>> it offers suggestions for other sites.
>> 
>> I think this test has to be removed.
>> 
>> Ralph
>> 
>>> On Jan 9, 2017, at 7:28 PM, Matt Sicker >> > wrote:
>>> 
>>> Well technically a UUID can be a valid hostname itself besides being 
>>> interpreted as a hex-encoded IP address (if the rest of it gets chopped 
>>> off). I've updated the test to use a jumble of invalid hostname characters 
>>> instead.
>>> 
>>> On 9 January 2017 at 20:26, Apache >> > wrote:
>>> nslookup dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>>> Server: 2001:578:3f::30
>>> Address:2001:578:3f::30#53
>>> 
>>> Non-authoritative answer:
>>> Name:   dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>>> Address: 92.242.140.2
>>> 
>>> 
>>> 
 On Jan 9, 2017, at 7:24 PM, Matt Sicker > wrote:
 
 I suppose technically the first part of a UUID can be an IPv4 address 
 encoded in hex. I'll make a better invalid value.
 
 On 9 January 2017 at 20:20, Apache > wrote:
 Debugging this and InetAddress.getByName is returning an InetAddress 
 object. The value is
 Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
 Address: 92.242.140.2
 
 Ralph
 
> On Jan 9, 2017, at 7:12 PM, Matt Sicker  > wrote:
> 
> Not sure how that's possible, but I added a better assert message. Let me 
> know if you're still having an issue with it. Is it a failure from 
> IntelliJ or Maven?
> 
> On 9 January 2017 at 19:47, Apache  > wrote:
> This commit appears to be failing for me. The testInvalidIpAddress method 
> is failing on the assert.
> 
> Ralph
> 
> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org 
> >  wrote:
> >
> > Repository: logging-log4j2
> > Updated Branches:
> >  refs/heads/master 367d26b09 -> 4254e2558
> >
> >
> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
> >
> >
> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo 
> > 
> > Commit: 
> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4254e255 
> > 
> > Tree: 
> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4254e255 
> > 
> > Diff: 
> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4254e255 
> > 
> >
> > Branch: refs/heads/master
> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
> > Parents: 367d26b
> > Author: Matt Sicker >
> > Authored: Fri Dec 30 15:00:17 2016 -0600
> > Committer: Matt Sicker  > >
> > Committed: Fri Dec 30 15:01:26 2016 -0600
> >
> > --
> > .../config/plugins/convert/TypeConverters.java  | 13 +++-
> > .../validation/constraints/ValidHost.java   | 41 +++
> > .../validation/constraints/ValidPort.java   | 44 
> > .../validators/ValidHostValidator.java  | 58 +++
> > .../validators/ValidPortValidator.java  | 53 ++
> > .../config/plugins/validation/HostAndPort.java  | 46 
> > .../validators/ValidHostValidatorTest.java  | 74 
> > 
> > .../validators/ValidPortValidatorTest.java  | 70 ++
> > src/changes/changes.xml |  3 +
> > 9 

[jira] [Assigned] (LOG4J2-1777) Add JUnit categories to integration tests for use in log4j-starter module test suites

2017-01-09 Thread Matt Sicker (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Sicker reassigned LOG4J2-1777:
---

Assignee: Matt Sicker

> Add JUnit categories to integration tests for use in log4j-starter module 
> test suites
> -
>
> Key: LOG4J2-1777
> URL: https://issues.apache.org/jira/browse/LOG4J2-1777
> Project: Log4j 2
>  Issue Type: Test
>  Components: Boot
>Reporter: Matt Sicker
>Assignee: Matt Sicker
>
> Add JUnit {{@Category}} 
> [annotations|https://github.com/junit-team/junit4/wiki/Categories] to the 
> various integration tests that correspond to Log4j Starter modules. Also add 
> test suites to log4j-starter modules themselves to run those tests as part of 
> their build.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Apache

Didn’t run the test. Don’t really have to.

nslookup "#$%^&*(*&^%$"
Server: 2001:578:3f::30
Address:2001:578:3f::30#53

Non-authoritative answer:
Name:   #\$%^&*\(*&^%\$
Address: 92.242.140.2


Ralph



> On Jan 9, 2017, at 7:31 PM, Matt Sicker  wrote:
> 
> Let me know if my updated test still causes issues.
> 
> On 9 January 2017 at 20:30, Apache  > wrote:
> I suspect this is my ISP at work.  When I enter an invalid domain I get a web 
> site from cox.net  saying it can’t find the domain and it 
> offers suggestions for other sites.
> 
> I think this test has to be removed.
> 
> Ralph
> 
>> On Jan 9, 2017, at 7:28 PM, Matt Sicker > > wrote:
>> 
>> Well technically a UUID can be a valid hostname itself besides being 
>> interpreted as a hex-encoded IP address (if the rest of it gets chopped 
>> off). I've updated the test to use a jumble of invalid hostname characters 
>> instead.
>> 
>> On 9 January 2017 at 20:26, Apache > > wrote:
>> nslookup dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>> Server:  2001:578:3f::30
>> Address: 2001:578:3f::30#53
>> 
>> Non-authoritative answer:
>> Name:dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>> Address: 92.242.140.2
>> 
>> 
>> 
>>> On Jan 9, 2017, at 7:24 PM, Matt Sicker >> > wrote:
>>> 
>>> I suppose technically the first part of a UUID can be an IPv4 address 
>>> encoded in hex. I'll make a better invalid value.
>>> 
>>> On 9 January 2017 at 20:20, Apache >> > wrote:
>>> Debugging this and InetAddress.getByName is returning an InetAddress 
>>> object. The value is
>>> Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>>> Address: 92.242.140.2
>>> 
>>> Ralph
>>> 
 On Jan 9, 2017, at 7:12 PM, Matt Sicker > wrote:
 
 Not sure how that's possible, but I added a better assert message. Let me 
 know if you're still having an issue with it. Is it a failure from 
 IntelliJ or Maven?
 
 On 9 January 2017 at 19:47, Apache > wrote:
 This commit appears to be failing for me. The testInvalidIpAddress method 
 is failing on the assert.
 
 Ralph
 
 > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org 
 >  wrote:
 >
 > Repository: logging-log4j2
 > Updated Branches:
 >  refs/heads/master 367d26b09 -> 4254e2558
 >
 >
 > [LOG4J2-1755]: Add converters and validators for hostnames/ports
 >
 >
 > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo 
 > 
 > Commit: 
 > http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4254e255 
 > 
 > Tree: 
 > http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4254e255 
 > 
 > Diff: 
 > http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4254e255 
 > 
 >
 > Branch: refs/heads/master
 > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
 > Parents: 367d26b
 > Author: Matt Sicker >
 > Authored: Fri Dec 30 15:00:17 2016 -0600
 > Committer: Matt Sicker >
 > Committed: Fri Dec 30 15:01:26 2016 -0600
 >
 > --
 > .../config/plugins/convert/TypeConverters.java  | 13 +++-
 > .../validation/constraints/ValidHost.java   | 41 +++
 > .../validation/constraints/ValidPort.java   | 44 
 > .../validators/ValidHostValidator.java  | 58 +++
 > .../validators/ValidPortValidator.java  | 53 ++
 > .../config/plugins/validation/HostAndPort.java  | 46 
 > .../validators/ValidHostValidatorTest.java  | 74 
 > .../validators/ValidPortValidatorTest.java  | 70 ++
 > src/changes/changes.xml |  3 +
 > 9 files changed, 401 insertions(+), 1 deletion(-)
 > --
 >
 >
 > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4254e255/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
 >  
 > 

Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Matt Sicker
Let me know if my updated test still causes issues.

On 9 January 2017 at 20:30, Apache  wrote:

> I suspect this is my ISP at work.  When I enter an invalid domain I get a
> web site from cox.net saying it can’t find the domain and it offers
> suggestions for other sites.
>
> I think this test has to be removed.
>
> Ralph
>
> On Jan 9, 2017, at 7:28 PM, Matt Sicker  wrote:
>
> Well technically a UUID can be a valid hostname itself besides being
> interpreted as a hex-encoded IP address (if the rest of it gets chopped
> off). I've updated the test to use a jumble of invalid hostname characters
> instead.
>
> On 9 January 2017 at 20:26, Apache  wrote:
>
>> nslookup dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>> Server: 2001:578:3f::30
>> Address: 2001:578:3f::30#53
>>
>> Non-authoritative answer:
>> Name: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>> Address: 92.242.140.2
>>
>>
>>
>> On Jan 9, 2017, at 7:24 PM, Matt Sicker  wrote:
>>
>> I suppose technically the first part of a UUID can be an IPv4 address
>> encoded in hex. I'll make a better invalid value.
>>
>> On 9 January 2017 at 20:20, Apache  wrote:
>>
>>> Debugging this and InetAddress.getByName is returning an InetAddress
>>> object. The value is
>>> Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>>> Address: 92.242.140.2
>>>
>>> Ralph
>>>
>>> On Jan 9, 2017, at 7:12 PM, Matt Sicker  wrote:
>>>
>>> Not sure how that's possible, but I added a better assert message. Let
>>> me know if you're still having an issue with it. Is it a failure from
>>> IntelliJ or Maven?
>>>
>>> On 9 January 2017 at 19:47, Apache  wrote:
>>>
 This commit appears to be failing for me. The testInvalidIpAddress
 method is failing on the assert.

 Ralph

 > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org wrote:
 >
 > Repository: logging-log4j2
 > Updated Branches:
 >  refs/heads/master 367d26b09 -> 4254e2558
 >
 >
 > [LOG4J2-1755]: Add converters and validators for hostnames/ports
 >
 >
 > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
 > Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit
 /4254e255
 > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4
 254e255
 > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4
 254e255
 >
 > Branch: refs/heads/master
 > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
 > Parents: 367d26b
 > Author: Matt Sicker 
 > Authored: Fri Dec 30 15:00:17 2016 -0600
 > Committer: Matt Sicker 
 > Committed: Fri Dec 30 15:01:26 2016 -0600
 >
 > 
 --
 > .../config/plugins/convert/TypeConverters.java  | 13 +++-
 > .../validation/constraints/ValidHost.java   | 41 +++
 > .../validation/constraints/ValidPort.java   | 44 
 > .../validators/ValidHostValidator.java  | 58 +++
 > .../validators/ValidPortValidator.java  | 53 ++
 > .../config/plugins/validation/HostAndPort.java  | 46 
 > .../validators/ValidHostValidatorTest.java  | 74
 
 > .../validators/ValidPortValidatorTest.java  | 70
 ++
 > src/changes/changes.xml |  3 +
 > 9 files changed, 401 insertions(+), 1 deletion(-)
 > 
 --
 >
 >
 > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4
 254e255/log4j-core/src/main/java/org/apache/logging/log4j/co
 re/config/plugins/convert/TypeConverters.java
 > 
 --
 > diff --git a/log4j-core/src/main/java/org
 /apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
 b/log4j-core/src/main/java/org/apache/logging/log4j/core/con
 fig/plugins/convert/TypeConverters.java
 > index 2895e52..421d711 100644
 > --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/con
 fig/plugins/convert/TypeConverters.java
 > +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/con
 fig/plugins/convert/TypeConverters.java
 > @@ -20,6 +20,7 @@ package org.apache.logging.log4j.core.
 config.plugins.convert;
 > import java.io.File;
 > import java.math.BigDecimal;
 > import java.math.BigInteger;
 > +import java.net.InetAddress;
 > import java.net.MalformedURLException;
 > import java.net.URI;
 > import java.net.URISyntaxException;
 > @@ -28,7 +29,6 @@ import java.nio.charset.Charset;
 > import java.security.Provider;
 > import java.security.Security;
 > 

Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Apache
I suspect this is my ISP at work.  When I enter an invalid domain I get a web 
site from cox.net  saying it can’t find the domain and it 
offers suggestions for other sites.

I think this test has to be removed.

Ralph

> On Jan 9, 2017, at 7:28 PM, Matt Sicker  wrote:
> 
> Well technically a UUID can be a valid hostname itself besides being 
> interpreted as a hex-encoded IP address (if the rest of it gets chopped off). 
> I've updated the test to use a jumble of invalid hostname characters instead.
> 
> On 9 January 2017 at 20:26, Apache  > wrote:
> nslookup dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
> Server:   2001:578:3f::30
> Address:  2001:578:3f::30#53
> 
> Non-authoritative answer:
> Name: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
> Address: 92.242.140.2
> 
> 
> 
>> On Jan 9, 2017, at 7:24 PM, Matt Sicker > > wrote:
>> 
>> I suppose technically the first part of a UUID can be an IPv4 address 
>> encoded in hex. I'll make a better invalid value.
>> 
>> On 9 January 2017 at 20:20, Apache > > wrote:
>> Debugging this and InetAddress.getByName is returning an InetAddress object. 
>> The value is
>> Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>> Address: 92.242.140.2
>> 
>> Ralph
>> 
>>> On Jan 9, 2017, at 7:12 PM, Matt Sicker >> > wrote:
>>> 
>>> Not sure how that's possible, but I added a better assert message. Let me 
>>> know if you're still having an issue with it. Is it a failure from IntelliJ 
>>> or Maven?
>>> 
>>> On 9 January 2017 at 19:47, Apache >> > wrote:
>>> This commit appears to be failing for me. The testInvalidIpAddress method 
>>> is failing on the assert.
>>> 
>>> Ralph
>>> 
>>> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org 
>>> >  wrote:
>>> >
>>> > Repository: logging-log4j2
>>> > Updated Branches:
>>> >  refs/heads/master 367d26b09 -> 4254e2558
>>> >
>>> >
>>> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
>>> >
>>> >
>>> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo 
>>> > 
>>> > Commit: 
>>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4254e255 
>>> > 
>>> > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4254e255 
>>> > 
>>> > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4254e255 
>>> > 
>>> >
>>> > Branch: refs/heads/master
>>> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
>>> > Parents: 367d26b
>>> > Author: Matt Sicker >
>>> > Authored: Fri Dec 30 15:00:17 2016 -0600
>>> > Committer: Matt Sicker >
>>> > Committed: Fri Dec 30 15:01:26 2016 -0600
>>> >
>>> > --
>>> > .../config/plugins/convert/TypeConverters.java  | 13 +++-
>>> > .../validation/constraints/ValidHost.java   | 41 +++
>>> > .../validation/constraints/ValidPort.java   | 44 
>>> > .../validators/ValidHostValidator.java  | 58 +++
>>> > .../validators/ValidPortValidator.java  | 53 ++
>>> > .../config/plugins/validation/HostAndPort.java  | 46 
>>> > .../validators/ValidHostValidatorTest.java  | 74 
>>> > .../validators/ValidPortValidatorTest.java  | 70 ++
>>> > src/changes/changes.xml |  3 +
>>> > 9 files changed, 401 insertions(+), 1 deletion(-)
>>> > --
>>> >
>>> >
>>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4254e255/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>>> >  
>>> > 
>>> > --
>>> > diff --git 
>>> > a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>>> >  
>>> > b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>>> > index 2895e52..421d711 100644
>>> > --- 
>>> > a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>>> > +++ 
>>> > 

Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Matt Sicker
Well technically a UUID can be a valid hostname itself besides being
interpreted as a hex-encoded IP address (if the rest of it gets chopped
off). I've updated the test to use a jumble of invalid hostname characters
instead.

On 9 January 2017 at 20:26, Apache  wrote:

> nslookup dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
> Server: 2001:578:3f::30
> Address: 2001:578:3f::30#53
>
> Non-authoritative answer:
> Name: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
> Address: 92.242.140.2
>
>
>
> On Jan 9, 2017, at 7:24 PM, Matt Sicker  wrote:
>
> I suppose technically the first part of a UUID can be an IPv4 address
> encoded in hex. I'll make a better invalid value.
>
> On 9 January 2017 at 20:20, Apache  wrote:
>
>> Debugging this and InetAddress.getByName is returning an InetAddress
>> object. The value is
>> Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
>> Address: 92.242.140.2
>>
>> Ralph
>>
>> On Jan 9, 2017, at 7:12 PM, Matt Sicker  wrote:
>>
>> Not sure how that's possible, but I added a better assert message. Let me
>> know if you're still having an issue with it. Is it a failure from IntelliJ
>> or Maven?
>>
>> On 9 January 2017 at 19:47, Apache  wrote:
>>
>>> This commit appears to be failing for me. The testInvalidIpAddress
>>> method is failing on the assert.
>>>
>>> Ralph
>>>
>>> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org wrote:
>>> >
>>> > Repository: logging-log4j2
>>> > Updated Branches:
>>> >  refs/heads/master 367d26b09 -> 4254e2558
>>> >
>>> >
>>> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
>>> >
>>> >
>>> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
>>> > Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit
>>> /4254e255
>>> > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4
>>> 254e255
>>> > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4
>>> 254e255
>>> >
>>> > Branch: refs/heads/master
>>> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
>>> > Parents: 367d26b
>>> > Author: Matt Sicker 
>>> > Authored: Fri Dec 30 15:00:17 2016 -0600
>>> > Committer: Matt Sicker 
>>> > Committed: Fri Dec 30 15:01:26 2016 -0600
>>> >
>>> > --
>>> > .../config/plugins/convert/TypeConverters.java  | 13 +++-
>>> > .../validation/constraints/ValidHost.java   | 41 +++
>>> > .../validation/constraints/ValidPort.java   | 44 
>>> > .../validators/ValidHostValidator.java  | 58 +++
>>> > .../validators/ValidPortValidator.java  | 53 ++
>>> > .../config/plugins/validation/HostAndPort.java  | 46 
>>> > .../validators/ValidHostValidatorTest.java  | 74
>>> 
>>> > .../validators/ValidPortValidatorTest.java  | 70
>>> ++
>>> > src/changes/changes.xml |  3 +
>>> > 9 files changed, 401 insertions(+), 1 deletion(-)
>>> > --
>>> >
>>> >
>>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4
>>> 254e255/log4j-core/src/main/java/org/apache/logging/log4j/co
>>> re/config/plugins/convert/TypeConverters.java
>>> > --
>>> > diff --git a/log4j-core/src/main/java/org
>>> /apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>>> b/log4j-core/src/main/java/org/apache/logging/log4j/core/con
>>> fig/plugins/convert/TypeConverters.java
>>> > index 2895e52..421d711 100644
>>> > --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/con
>>> fig/plugins/convert/TypeConverters.java
>>> > +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/con
>>> fig/plugins/convert/TypeConverters.java
>>> > @@ -20,6 +20,7 @@ package org.apache.logging.log4j.core.
>>> config.plugins.convert;
>>> > import java.io.File;
>>> > import java.math.BigDecimal;
>>> > import java.math.BigInteger;
>>> > +import java.net.InetAddress;
>>> > import java.net.MalformedURLException;
>>> > import java.net.URI;
>>> > import java.net.URISyntaxException;
>>> > @@ -28,7 +29,6 @@ import java.nio.charset.Charset;
>>> > import java.security.Provider;
>>> > import java.security.Security;
>>> > import java.util.regex.Pattern;
>>> > -
>>> > import javax.xml.bind.DatatypeConverter;
>>> >
>>> > import org.apache.logging.log4j.Level;
>>> > @@ -233,6 +233,17 @@ public final class TypeConverters {
>>> > }
>>> >
>>> > /**
>>> > + * Converts a {@link String} into an {@link InetAddress}.
>>> > + */
>>> > +@Plugin(name = "InetAddress", category = CATEGORY)
>>> > +public static class InetAddressConverter implements
>>> TypeConverter {
>>> > +@Override
>>> > +public InetAddress convert(final String s) throws Exception {

Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Apache
nslookup dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
Server: 2001:578:3f::30
Address:2001:578:3f::30#53

Non-authoritative answer:
Name:   dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
Address: 92.242.140.2



> On Jan 9, 2017, at 7:24 PM, Matt Sicker  wrote:
> 
> I suppose technically the first part of a UUID can be an IPv4 address encoded 
> in hex. I'll make a better invalid value.
> 
> On 9 January 2017 at 20:20, Apache  > wrote:
> Debugging this and InetAddress.getByName is returning an InetAddress object. 
> The value is
> Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
> Address: 92.242.140.2
> 
> Ralph
> 
>> On Jan 9, 2017, at 7:12 PM, Matt Sicker > > wrote:
>> 
>> Not sure how that's possible, but I added a better assert message. Let me 
>> know if you're still having an issue with it. Is it a failure from IntelliJ 
>> or Maven?
>> 
>> On 9 January 2017 at 19:47, Apache > > wrote:
>> This commit appears to be failing for me. The testInvalidIpAddress method is 
>> failing on the assert.
>> 
>> Ralph
>> 
>> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org 
>> >  wrote:
>> >
>> > Repository: logging-log4j2
>> > Updated Branches:
>> >  refs/heads/master 367d26b09 -> 4254e2558
>> >
>> >
>> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
>> >
>> >
>> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo 
>> > 
>> > Commit: 
>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4254e255 
>> > 
>> > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4254e255 
>> > 
>> > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4254e255 
>> > 
>> >
>> > Branch: refs/heads/master
>> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
>> > Parents: 367d26b
>> > Author: Matt Sicker >
>> > Authored: Fri Dec 30 15:00:17 2016 -0600
>> > Committer: Matt Sicker >
>> > Committed: Fri Dec 30 15:01:26 2016 -0600
>> >
>> > --
>> > .../config/plugins/convert/TypeConverters.java  | 13 +++-
>> > .../validation/constraints/ValidHost.java   | 41 +++
>> > .../validation/constraints/ValidPort.java   | 44 
>> > .../validators/ValidHostValidator.java  | 58 +++
>> > .../validators/ValidPortValidator.java  | 53 ++
>> > .../config/plugins/validation/HostAndPort.java  | 46 
>> > .../validators/ValidHostValidatorTest.java  | 74 
>> > .../validators/ValidPortValidatorTest.java  | 70 ++
>> > src/changes/changes.xml |  3 +
>> > 9 files changed, 401 insertions(+), 1 deletion(-)
>> > --
>> >
>> >
>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4254e255/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> >  
>> > 
>> > --
>> > diff --git 
>> > a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> >  
>> > b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> > index 2895e52..421d711 100644
>> > --- 
>> > a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> > +++ 
>> > b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> > @@ -20,6 +20,7 @@ package 
>> > org.apache.logging.log4j.core.config.plugins.convert;
>> > import java.io.File;
>> > import java.math.BigDecimal;
>> > import java.math.BigInteger;
>> > +import java.net.InetAddress;
>> > import java.net .MalformedURLException;
>> > import java.net.URI;
>> > import java.net.URISyntaxException;
>> > @@ -28,7 +29,6 @@ import java.nio.charset.Charset;
>> > import java.security.Provider;
>> > import java.security.Security;
>> > import java.util.regex.Pattern;
>> > -
>> > import javax.xml.bind.DatatypeConverter;
>> >
>> > import org.apache.logging.log4j.Level;
>> > @@ -233,6 +233,17 @@ public final class TypeConverters {
>> > }
>> >
>> > /**
>> > + * 

Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Matt Sicker
I suppose technically the first part of a UUID can be an IPv4 address
encoded in hex. I'll make a better invalid value.

On 9 January 2017 at 20:20, Apache  wrote:

> Debugging this and InetAddress.getByName is returning an InetAddress
> object. The value is
> Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
> Address: 92.242.140.2
>
> Ralph
>
> On Jan 9, 2017, at 7:12 PM, Matt Sicker  wrote:
>
> Not sure how that's possible, but I added a better assert message. Let me
> know if you're still having an issue with it. Is it a failure from IntelliJ
> or Maven?
>
> On 9 January 2017 at 19:47, Apache  wrote:
>
>> This commit appears to be failing for me. The testInvalidIpAddress method
>> is failing on the assert.
>>
>> Ralph
>>
>> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org wrote:
>> >
>> > Repository: logging-log4j2
>> > Updated Branches:
>> >  refs/heads/master 367d26b09 -> 4254e2558
>> >
>> >
>> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
>> >
>> >
>> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
>> > Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit
>> /4254e255
>> > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4
>> 254e255
>> > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4
>> 254e255
>> >
>> > Branch: refs/heads/master
>> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
>> > Parents: 367d26b
>> > Author: Matt Sicker 
>> > Authored: Fri Dec 30 15:00:17 2016 -0600
>> > Committer: Matt Sicker 
>> > Committed: Fri Dec 30 15:01:26 2016 -0600
>> >
>> > --
>> > .../config/plugins/convert/TypeConverters.java  | 13 +++-
>> > .../validation/constraints/ValidHost.java   | 41 +++
>> > .../validation/constraints/ValidPort.java   | 44 
>> > .../validators/ValidHostValidator.java  | 58 +++
>> > .../validators/ValidPortValidator.java  | 53 ++
>> > .../config/plugins/validation/HostAndPort.java  | 46 
>> > .../validators/ValidHostValidatorTest.java  | 74
>> 
>> > .../validators/ValidPortValidatorTest.java  | 70 ++
>> > src/changes/changes.xml |  3 +
>> > 9 files changed, 401 insertions(+), 1 deletion(-)
>> > --
>> >
>> >
>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4
>> 254e255/log4j-core/src/main/java/org/apache/logging/log4j/co
>> re/config/plugins/convert/TypeConverters.java
>> > --
>> > diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/con
>> fig/plugins/convert/TypeConverters.java b/log4j-core/src/main/java/org
>> /apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> > index 2895e52..421d711 100644
>> > --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/con
>> fig/plugins/convert/TypeConverters.java
>> > +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/con
>> fig/plugins/convert/TypeConverters.java
>> > @@ -20,6 +20,7 @@ package org.apache.logging.log4j.core.
>> config.plugins.convert;
>> > import java.io.File;
>> > import java.math.BigDecimal;
>> > import java.math.BigInteger;
>> > +import java.net.InetAddress;
>> > import java.net.MalformedURLException;
>> > import java.net.URI;
>> > import java.net.URISyntaxException;
>> > @@ -28,7 +29,6 @@ import java.nio.charset.Charset;
>> > import java.security.Provider;
>> > import java.security.Security;
>> > import java.util.regex.Pattern;
>> > -
>> > import javax.xml.bind.DatatypeConverter;
>> >
>> > import org.apache.logging.log4j.Level;
>> > @@ -233,6 +233,17 @@ public final class TypeConverters {
>> > }
>> >
>> > /**
>> > + * Converts a {@link String} into an {@link InetAddress}.
>> > + */
>> > +@Plugin(name = "InetAddress", category = CATEGORY)
>> > +public static class InetAddressConverter implements
>> TypeConverter {
>> > +@Override
>> > +public InetAddress convert(final String s) throws Exception {
>> > +return InetAddress.getByName(s);
>> > +}
>> > +}
>> > +
>> > +/**
>> >  * Converts a {@link String} into a {@link Integer}.
>> >  */
>> > @Plugin(name = "Integer", category = CATEGORY)
>> >
>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4
>> 254e255/log4j-core/src/main/java/org/apache/logging/log4j/co
>> re/config/plugins/validation/constraints/ValidHost.java
>> > --
>> > diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/con
>> fig/plugins/validation/constraints/ValidHost.java
>> b/log4j-core/src/main/java/org/apache/logging/log4j/core/con

Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Apache
Running it again I obviously get a different host address but the same IP 
address is returned.

Ralph

> On Jan 9, 2017, at 7:20 PM, Apache  wrote:
> 
> Debugging this and InetAddress.getByName is returning an InetAddress object. 
> The value is
> Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
> Address: 92.242.140.2
> 
> Ralph
> 
>> On Jan 9, 2017, at 7:12 PM, Matt Sicker > > wrote:
>> 
>> Not sure how that's possible, but I added a better assert message. Let me 
>> know if you're still having an issue with it. Is it a failure from IntelliJ 
>> or Maven?
>> 
>> On 9 January 2017 at 19:47, Apache > > wrote:
>> This commit appears to be failing for me. The testInvalidIpAddress method is 
>> failing on the assert.
>> 
>> Ralph
>> 
>> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org 
>> >  wrote:
>> >
>> > Repository: logging-log4j2
>> > Updated Branches:
>> >  refs/heads/master 367d26b09 -> 4254e2558
>> >
>> >
>> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
>> >
>> >
>> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo 
>> > 
>> > Commit: 
>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4254e255 
>> > 
>> > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4254e255 
>> > 
>> > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4254e255 
>> > 
>> >
>> > Branch: refs/heads/master
>> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
>> > Parents: 367d26b
>> > Author: Matt Sicker >
>> > Authored: Fri Dec 30 15:00:17 2016 -0600
>> > Committer: Matt Sicker >
>> > Committed: Fri Dec 30 15:01:26 2016 -0600
>> >
>> > --
>> > .../config/plugins/convert/TypeConverters.java  | 13 +++-
>> > .../validation/constraints/ValidHost.java   | 41 +++
>> > .../validation/constraints/ValidPort.java   | 44 
>> > .../validators/ValidHostValidator.java  | 58 +++
>> > .../validators/ValidPortValidator.java  | 53 ++
>> > .../config/plugins/validation/HostAndPort.java  | 46 
>> > .../validators/ValidHostValidatorTest.java  | 74 
>> > .../validators/ValidPortValidatorTest.java  | 70 ++
>> > src/changes/changes.xml |  3 +
>> > 9 files changed, 401 insertions(+), 1 deletion(-)
>> > --
>> >
>> >
>> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4254e255/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> >  
>> > 
>> > --
>> > diff --git 
>> > a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> >  
>> > b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> > index 2895e52..421d711 100644
>> > --- 
>> > a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> > +++ 
>> > b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>> > @@ -20,6 +20,7 @@ package 
>> > org.apache.logging.log4j.core.config.plugins.convert;
>> > import java.io.File;
>> > import java.math.BigDecimal;
>> > import java.math.BigInteger;
>> > +import java.net.InetAddress;
>> > import java.net .MalformedURLException;
>> > import java.net.URI;
>> > import java.net.URISyntaxException;
>> > @@ -28,7 +29,6 @@ import java.nio.charset.Charset;
>> > import java.security.Provider;
>> > import java.security.Security;
>> > import java.util.regex.Pattern;
>> > -
>> > import javax.xml.bind.DatatypeConverter;
>> >
>> > import org.apache.logging.log4j.Level;
>> > @@ -233,6 +233,17 @@ public final class TypeConverters {
>> > }
>> >
>> > /**
>> > + * Converts a {@link String} into an {@link InetAddress}.
>> > + */
>> > +@Plugin(name = "InetAddress", category = CATEGORY)
>> > +public static class InetAddressConverter implements 
>> > TypeConverter {
>> > +@Override
>> > +public InetAddress convert(final String s) throws Exception {
>> > +return 

Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Apache
Debugging this and InetAddress.getByName is returning an InetAddress object. 
The value is
Host: dcc071ab-bc05-46ed-bfc0-be5fe876f6ea
Address: 92.242.140.2

Ralph

> On Jan 9, 2017, at 7:12 PM, Matt Sicker  wrote:
> 
> Not sure how that's possible, but I added a better assert message. Let me 
> know if you're still having an issue with it. Is it a failure from IntelliJ 
> or Maven?
> 
> On 9 January 2017 at 19:47, Apache  > wrote:
> This commit appears to be failing for me. The testInvalidIpAddress method is 
> failing on the assert.
> 
> Ralph
> 
> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org 
> >  wrote:
> >
> > Repository: logging-log4j2
> > Updated Branches:
> >  refs/heads/master 367d26b09 -> 4254e2558
> >
> >
> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
> >
> >
> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo 
> > 
> > Commit: 
> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4254e255 
> > 
> > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4254e255 
> > 
> > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4254e255 
> > 
> >
> > Branch: refs/heads/master
> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
> > Parents: 367d26b
> > Author: Matt Sicker >
> > Authored: Fri Dec 30 15:00:17 2016 -0600
> > Committer: Matt Sicker >
> > Committed: Fri Dec 30 15:01:26 2016 -0600
> >
> > --
> > .../config/plugins/convert/TypeConverters.java  | 13 +++-
> > .../validation/constraints/ValidHost.java   | 41 +++
> > .../validation/constraints/ValidPort.java   | 44 
> > .../validators/ValidHostValidator.java  | 58 +++
> > .../validators/ValidPortValidator.java  | 53 ++
> > .../config/plugins/validation/HostAndPort.java  | 46 
> > .../validators/ValidHostValidatorTest.java  | 74 
> > .../validators/ValidPortValidatorTest.java  | 70 ++
> > src/changes/changes.xml |  3 +
> > 9 files changed, 401 insertions(+), 1 deletion(-)
> > --
> >
> >
> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4254e255/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
> >  
> > 
> > --
> > diff --git 
> > a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
> >  
> > b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
> > index 2895e52..421d711 100644
> > --- 
> > a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
> > +++ 
> > b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
> > @@ -20,6 +20,7 @@ package 
> > org.apache.logging.log4j.core.config.plugins.convert;
> > import java.io.File;
> > import java.math.BigDecimal;
> > import java.math.BigInteger;
> > +import java.net.InetAddress;
> > import java.net .MalformedURLException;
> > import java.net.URI;
> > import java.net.URISyntaxException;
> > @@ -28,7 +29,6 @@ import java.nio.charset.Charset;
> > import java.security.Provider;
> > import java.security.Security;
> > import java.util.regex.Pattern;
> > -
> > import javax.xml.bind.DatatypeConverter;
> >
> > import org.apache.logging.log4j.Level;
> > @@ -233,6 +233,17 @@ public final class TypeConverters {
> > }
> >
> > /**
> > + * Converts a {@link String} into an {@link InetAddress}.
> > + */
> > +@Plugin(name = "InetAddress", category = CATEGORY)
> > +public static class InetAddressConverter implements 
> > TypeConverter {
> > +@Override
> > +public InetAddress convert(final String s) throws Exception {
> > +return InetAddress.getByName(s);
> > +}
> > +}
> > +
> > +/**
> >  * Converts a {@link String} into a {@link Integer}.
> >  */
> > @Plugin(name = "Integer", category = CATEGORY)
> >
> > 

[jira] [Created] (LOG4J2-1778) Add logging-log4j-boot git repo

2017-01-09 Thread Matt Sicker (JIRA)
Matt Sicker created LOG4J2-1778:
---

 Summary: Add logging-log4j-boot git repo
 Key: LOG4J2-1778
 URL: https://issues.apache.org/jira/browse/LOG4J2-1778
 Project: Log4j 2
  Issue Type: New Git Repo
  Components: Boot
Reporter: Matt Sicker
Assignee: Matt Sicker


Create a new git repository to host Log4j Boot.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1775) Log4j Boot modules for easy dependency management

2017-01-09 Thread Matt Sicker (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Sicker updated LOG4J2-1775:

Summary: Log4j Boot modules for easy dependency management  (was: Add boot 
pom files for dependency management)

> Log4j Boot modules for easy dependency management
> -
>
> Key: LOG4J2-1775
> URL: https://issues.apache.org/jira/browse/LOG4J2-1775
> Project: Log4j 2
>  Issue Type: Epic
>  Components: Boot, Documentation, Plugins
>Reporter: Matt Sicker
>  Labels: build, documentation, features, maven, test
>
> Create what is essentially Log4j Boot for adding necessary dependencies to 
> support the various plugins while at the same time promoting the use of 
> log4j-api as a general purpose logging API standard. These modules would 
> categorise all the various natural dependency barriers for a sort of pseudo 
> module system that could also help in any necessary module metadata needed to 
> support Java 9 and OSGi, categorise integration style unit tests to help test 
> the starters themselves in an automated way, and organise the site in such a 
> way as to make it easier to integrate different git repositories as we 
> modularise the core in general.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



Re: How about a log4j-starters sort of repository?

2017-01-09 Thread Matt Sicker
Going to go with the name Log4j Boot. I submitted a git repo request and
the form says it should be created within the hour.

On 8 January 2017 at 23:13, Apache  wrote:

> Go for it!
>
> Ralph
>
> On Jan 8, 2017, at 1:44 PM, Matt Sicker  wrote:
>
> Also, one neat aspect of this that I didn't think of at first is that as
> we trim down log4j-core and the main logging-log4j2 repository, users won't
> need to worry about changing dependencies down the line as the updated
> starters will point to the proper dependencies.
>
> I also have two more starter ideas:
>
> * One that brings in all relevant log4j bridges (slf4j-impl, jul, jcl,
> log4j-1.2)
> * One that brings in all relevant slf4j bridges instead (slf4j-impl,
> jcl-over-slf4j, jul-to-slf4j) similar to the spring-boot-starter-log4j2
>
> For completeness sake, I'd also be willing to add starters for a few
> trivial things like the various bridges and log4j-api-lang modules, though
> those should work well enough without using a starter (though it could be
> confusing if there is no starter for them).
>
> On 8 January 2017 at 14:26, Matt Sicker  wrote:
>
>> I think I have a decent idea on how to handle the optional dependencies
>> confusion without needing to split off log4j-core into a zillion
>> submodules. The idea is inspired by the spring-boot-starter-* packages that
>> give you a dependency that's just a pom.xml file (along with some META-INF
>> files, but that would be irrelevant here) that pull in the required
>> dependencies for a feature. So, for example, we could make up a bunch of
>> log4j-starter-* modules that contain pom.xml files to pull in all necessary
>> dependencies for a particular optional feature. Examples:
>>
>> [all modules would start with the prefix "log4j-starter-"]
>> * async (for AsyncLogger; brings in LMAX disruptor)
>> * config-json
>> * config-yaml
>> * script-groovy
>> * layout-csv
>> * layout-jansi (for windows users and coloured log messages)
>> * layout-json (unless this has been ported to not require jackson
>> anymore?)
>> * layout-xml
>> * layout-yaml
>> * appender-async-conversant
>> * appender-async-jctools
>> * appender-cassandra
>> * appender-couchdb
>> * appender-jms
>> * appender-jpa
>> * appender-kafka
>> * appender-mongodb
>> * appender-smtp
>> * appender-zeromq (or jeromq?)
>>
>> I may have missed a few, but the base set of starters should at least
>> correspond to all optional dependencies in log4j-core or the addon modules.
>> For the jms, jpa, and smtp appenders, we could either make add in a default
>> provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) or split
>> those into provider-specific starters.
>>
>> Ideally, these starters would live in their own repository
>> (logging-log4j-starters), and the groupId can be either
>> org.apache.logging.log4j (I think that'd get confusing when searching on
>> maven.org) or org.apache.logging.log4j.starter(s).
>>
>> So what do you think?
>>
>> --
>> Matt Sicker 
>>
>
>
>
> --
> Matt Sicker 
>
>
>


-- 
Matt Sicker 


[jira] [Updated] (LOG4J2-1776) log4j-boot pom modules for dependency management

2017-01-09 Thread Matt Sicker (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Sicker updated LOG4J2-1776:

Description: 
This is the main feature for the Log4j Boot epic (LOG4J2-1775).

{code}
groupId: org.apache.logging.log4j.boot
artifactId: log4j-boot-*
{code}

* core: just log4j-core basically
* async (for AsyncLogger; brings in LMAX disruptor)
* log4j-spi: log4j-slf4j-impl, log4j-jul, log4j-jcl, log4j-1.2-api
* slf4j-spi: slf4j-impl, jcl-over-slf4j, jul-to-slf4j (same dependency set as 
spring-boot-starter-log4j2)
* logback (for log4j-to-slf4j, slf4j-spi, logback; this helps aid migration to 
log4j-api and promotes it as a general use logging API)
* appender-async-conversant
* appender-async-jctools
* appender-cassandra
* appender-couchdb
* appender-jms
* appender-jpa
* appender-kafka
* appender-mongodb
* appender-smtp
* appender-zeromq
* config-json
* config-yaml
* layout-csv
* layout-jansi (for windows users and coloured log messages)
* layout-json (unless this has been ported to not require jackson anymore?)
* layout-xml
* layout-yaml
* script-groovy

I may have missed a few, but the base set of starters should at least 
correspond to all optional dependencies in log4j-core or the addon modules. For 
the jms, jpa, and smtp (log4j-core) appenders, we could either make add in a 
default provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) or 
split those into provider-specific starters.

  was:
This is the main feature for the Log4j Starter epic (LOG4J2-1775).

{code}
groupId: org.apache.logging.log4j.starter
artifactId: log4j-starter-*
{code}

* core: just log4j-core basically
* async (for AsyncLogger; brings in LMAX disruptor)
* log4j-spi: log4j-slf4j-impl, log4j-jul, log4j-jcl, log4j-1.2-api
* slf4j-spi: slf4j-impl, jcl-over-slf4j, jul-to-slf4j (same dependency set as 
spring-boot-starter-log4j2)
* logback (for log4j-to-slf4j, slf4j-spi, logback; this helps aid migration to 
log4j-api and promotes it as a general use logging API)
* appender-async-conversant
* appender-async-jctools
* appender-cassandra
* appender-couchdb
* appender-jms
* appender-jpa
* appender-kafka
* appender-mongodb
* appender-smtp
* appender-zeromq
* config-json
* config-yaml
* layout-csv
* layout-jansi (for windows users and coloured log messages)
* layout-json (unless this has been ported to not require jackson anymore?)
* layout-xml
* layout-yaml
* script-groovy

I may have missed a few, but the base set of starters should at least 
correspond to all optional dependencies in log4j-core or the addon modules. For 
the jms, jpa, and smtp (log4j-core) appenders, we could either make add in a 
default provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) or 
split those into provider-specific starters.


> log4j-boot pom modules for dependency management
> 
>
> Key: LOG4J2-1776
> URL: https://issues.apache.org/jira/browse/LOG4J2-1776
> Project: Log4j 2
>  Issue Type: New Feature
>  Components: Boot
>Reporter: Matt Sicker
>
> This is the main feature for the Log4j Boot epic (LOG4J2-1775).
> {code}
> groupId: org.apache.logging.log4j.boot
> artifactId: log4j-boot-*
> {code}
> * core: just log4j-core basically
> * async (for AsyncLogger; brings in LMAX disruptor)
> * log4j-spi: log4j-slf4j-impl, log4j-jul, log4j-jcl, log4j-1.2-api
> * slf4j-spi: slf4j-impl, jcl-over-slf4j, jul-to-slf4j (same dependency set as 
> spring-boot-starter-log4j2)
> * logback (for log4j-to-slf4j, slf4j-spi, logback; this helps aid migration 
> to log4j-api and promotes it as a general use logging API)
> * appender-async-conversant
> * appender-async-jctools
> * appender-cassandra
> * appender-couchdb
> * appender-jms
> * appender-jpa
> * appender-kafka
> * appender-mongodb
> * appender-smtp
> * appender-zeromq
> * config-json
> * config-yaml
> * layout-csv
> * layout-jansi (for windows users and coloured log messages)
> * layout-json (unless this has been ported to not require jackson anymore?)
> * layout-xml
> * layout-yaml
> * script-groovy
> I may have missed a few, but the base set of starters should at least 
> correspond to all optional dependencies in log4j-core or the addon modules. 
> For the jms, jpa, and smtp (log4j-core) appenders, we could either make add 
> in a default provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) 
> or split those into provider-specific starters.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1776) log4j-boot pom modules for dependency management

2017-01-09 Thread Matt Sicker (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Sicker updated LOG4J2-1776:

Summary: log4j-boot pom modules for dependency management  (was: 
log4j-starter pom modules for dependency management)

> log4j-boot pom modules for dependency management
> 
>
> Key: LOG4J2-1776
> URL: https://issues.apache.org/jira/browse/LOG4J2-1776
> Project: Log4j 2
>  Issue Type: New Feature
>  Components: Boot
>Reporter: Matt Sicker
>
> This is the main feature for the Log4j Starter epic (LOG4J2-1775).
> {code}
> groupId: org.apache.logging.log4j.starter
> artifactId: log4j-starter-*
> {code}
> * core: just log4j-core basically
> * async (for AsyncLogger; brings in LMAX disruptor)
> * log4j-spi: log4j-slf4j-impl, log4j-jul, log4j-jcl, log4j-1.2-api
> * slf4j-spi: slf4j-impl, jcl-over-slf4j, jul-to-slf4j (same dependency set as 
> spring-boot-starter-log4j2)
> * logback (for log4j-to-slf4j, slf4j-spi, logback; this helps aid migration 
> to log4j-api and promotes it as a general use logging API)
> * appender-async-conversant
> * appender-async-jctools
> * appender-cassandra
> * appender-couchdb
> * appender-jms
> * appender-jpa
> * appender-kafka
> * appender-mongodb
> * appender-smtp
> * appender-zeromq
> * config-json
> * config-yaml
> * layout-csv
> * layout-jansi (for windows users and coloured log messages)
> * layout-json (unless this has been ported to not require jackson anymore?)
> * layout-xml
> * layout-yaml
> * script-groovy
> I may have missed a few, but the base set of starters should at least 
> correspond to all optional dependencies in log4j-core or the addon modules. 
> For the jms, jpa, and smtp (log4j-core) appenders, we could either make add 
> in a default provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) 
> or split those into provider-specific starters.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1775) Add boot pom files for dependency management

2017-01-09 Thread Gary Gregory (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Gregory updated LOG4J2-1775:
-
Summary: Add boot pom files for dependency management  (was: Add starter 
pom files for dependency management)

> Add boot pom files for dependency management
> 
>
> Key: LOG4J2-1775
> URL: https://issues.apache.org/jira/browse/LOG4J2-1775
> Project: Log4j 2
>  Issue Type: Epic
>  Components: Boot, Documentation, Plugins
>Reporter: Matt Sicker
>  Labels: build, documentation, features, maven, test
>
> Create what is essentially Log4j Boot for adding necessary dependencies to 
> support the various plugins while at the same time promoting the use of 
> log4j-api as a general purpose logging API standard. These modules would 
> categorise all the various natural dependency barriers for a sort of pseudo 
> module system that could also help in any necessary module metadata needed to 
> support Java 9 and OSGi, categorise integration style unit tests to help test 
> the starters themselves in an automated way, and organise the site in such a 
> way as to make it easier to integrate different git repositories as we 
> modularise the core in general.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1775) Add starter pom files for dependency management

2017-01-09 Thread Matt Sicker (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Sicker updated LOG4J2-1775:

Epic Name: Log4j Boot  (was: Log4j Starters)

> Add starter pom files for dependency management
> ---
>
> Key: LOG4J2-1775
> URL: https://issues.apache.org/jira/browse/LOG4J2-1775
> Project: Log4j 2
>  Issue Type: Epic
>  Components: Documentation, Plugins, Starters
>Reporter: Matt Sicker
>  Labels: build, documentation, features, maven, test
>
> Create what is essentially Log4j Boot for adding necessary dependencies to 
> support the various plugins while at the same time promoting the use of 
> log4j-api as a general purpose logging API standard. These modules would 
> categorise all the various natural dependency barriers for a sort of pseudo 
> module system that could also help in any necessary module metadata needed to 
> support Java 9 and OSGi, categorise integration style unit tests to help test 
> the starters themselves in an automated way, and organise the site in such a 
> way as to make it easier to integrate different git repositories as we 
> modularise the core in general.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Matt Sicker
Not sure how that's possible, but I added a better assert message. Let me
know if you're still having an issue with it. Is it a failure from IntelliJ
or Maven?

On 9 January 2017 at 19:47, Apache  wrote:

> This commit appears to be failing for me. The testInvalidIpAddress method
> is failing on the assert.
>
> Ralph
>
> > On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org wrote:
> >
> > Repository: logging-log4j2
> > Updated Branches:
> >  refs/heads/master 367d26b09 -> 4254e2558
> >
> >
> > [LOG4J2-1755]: Add converters and validators for hostnames/ports
> >
> >
> > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
> > Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/
> commit/4254e255
> > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/
> 4254e255
> > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/
> 4254e255
> >
> > Branch: refs/heads/master
> > Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
> > Parents: 367d26b
> > Author: Matt Sicker 
> > Authored: Fri Dec 30 15:00:17 2016 -0600
> > Committer: Matt Sicker 
> > Committed: Fri Dec 30 15:01:26 2016 -0600
> >
> > --
> > .../config/plugins/convert/TypeConverters.java  | 13 +++-
> > .../validation/constraints/ValidHost.java   | 41 +++
> > .../validation/constraints/ValidPort.java   | 44 
> > .../validators/ValidHostValidator.java  | 58 +++
> > .../validators/ValidPortValidator.java  | 53 ++
> > .../config/plugins/validation/HostAndPort.java  | 46 
> > .../validators/ValidHostValidatorTest.java  | 74
> 
> > .../validators/ValidPortValidatorTest.java  | 70 ++
> > src/changes/changes.xml |  3 +
> > 9 files changed, 401 insertions(+), 1 deletion(-)
> > --
> >
> >
> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/
> 4254e255/log4j-core/src/main/java/org/apache/logging/log4j/
> core/config/plugins/convert/TypeConverters.java
> > --
> > diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/
> config/plugins/convert/TypeConverters.java b/log4j-core/src/main/java/
> org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
> > index 2895e52..421d711 100644
> > --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/
> config/plugins/convert/TypeConverters.java
> > +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/
> config/plugins/convert/TypeConverters.java
> > @@ -20,6 +20,7 @@ package org.apache.logging.log4j.core.
> config.plugins.convert;
> > import java.io.File;
> > import java.math.BigDecimal;
> > import java.math.BigInteger;
> > +import java.net.InetAddress;
> > import java.net.MalformedURLException;
> > import java.net.URI;
> > import java.net.URISyntaxException;
> > @@ -28,7 +29,6 @@ import java.nio.charset.Charset;
> > import java.security.Provider;
> > import java.security.Security;
> > import java.util.regex.Pattern;
> > -
> > import javax.xml.bind.DatatypeConverter;
> >
> > import org.apache.logging.log4j.Level;
> > @@ -233,6 +233,17 @@ public final class TypeConverters {
> > }
> >
> > /**
> > + * Converts a {@link String} into an {@link InetAddress}.
> > + */
> > +@Plugin(name = "InetAddress", category = CATEGORY)
> > +public static class InetAddressConverter implements
> TypeConverter {
> > +@Override
> > +public InetAddress convert(final String s) throws Exception {
> > +return InetAddress.getByName(s);
> > +}
> > +}
> > +
> > +/**
> >  * Converts a {@link String} into a {@link Integer}.
> >  */
> > @Plugin(name = "Integer", category = CATEGORY)
> >
> > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/
> 4254e255/log4j-core/src/main/java/org/apache/logging/log4j/
> core/config/plugins/validation/constraints/ValidHost.java
> > --
> > diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/
> config/plugins/validation/constraints/ValidHost.java
> b/log4j-core/src/main/java/org/apache/logging/log4j/core/
> config/plugins/validation/constraints/ValidHost.java
> > new file mode 100644
> > index 000..c652d40
> > --- /dev/null
> > +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/
> config/plugins/validation/constraints/ValidHost.java
> > @@ -0,0 +1,41 @@
> > +/*
> > + * Licensed to the Apache Software Foundation (ASF) under one or more
> > + * contributor license agreements. See the NOTICE file distributed with
> > + * this work for additional information regarding copyright ownership.
> > + * The ASF licenses this file to You under 

Re: logging-log4j2 git commit: [LOG4J2-1755]: Add converters and validators for hostnames/ports

2017-01-09 Thread Apache
This commit appears to be failing for me. The testInvalidIpAddress method is 
failing on the assert.

Ralph

> On Dec 30, 2016, at 2:01 PM, mattsic...@apache.org wrote:
> 
> Repository: logging-log4j2
> Updated Branches:
>  refs/heads/master 367d26b09 -> 4254e2558
> 
> 
> [LOG4J2-1755]: Add converters and validators for hostnames/ports
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
> Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4254e255
> Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4254e255
> Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4254e255
> 
> Branch: refs/heads/master
> Commit: 4254e2558d27351774c4bf2ad24471ca05e00018
> Parents: 367d26b
> Author: Matt Sicker 
> Authored: Fri Dec 30 15:00:17 2016 -0600
> Committer: Matt Sicker 
> Committed: Fri Dec 30 15:01:26 2016 -0600
> 
> --
> .../config/plugins/convert/TypeConverters.java  | 13 +++-
> .../validation/constraints/ValidHost.java   | 41 +++
> .../validation/constraints/ValidPort.java   | 44 
> .../validators/ValidHostValidator.java  | 58 +++
> .../validators/ValidPortValidator.java  | 53 ++
> .../config/plugins/validation/HostAndPort.java  | 46 
> .../validators/ValidHostValidatorTest.java  | 74 
> .../validators/ValidPortValidatorTest.java  | 70 ++
> src/changes/changes.xml |  3 +
> 9 files changed, 401 insertions(+), 1 deletion(-)
> --
> 
> 
> http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4254e255/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
> --
> diff --git 
> a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
>  
> b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
> index 2895e52..421d711 100644
> --- 
> a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
> +++ 
> b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java
> @@ -20,6 +20,7 @@ package 
> org.apache.logging.log4j.core.config.plugins.convert;
> import java.io.File;
> import java.math.BigDecimal;
> import java.math.BigInteger;
> +import java.net.InetAddress;
> import java.net.MalformedURLException;
> import java.net.URI;
> import java.net.URISyntaxException;
> @@ -28,7 +29,6 @@ import java.nio.charset.Charset;
> import java.security.Provider;
> import java.security.Security;
> import java.util.regex.Pattern;
> -
> import javax.xml.bind.DatatypeConverter;
> 
> import org.apache.logging.log4j.Level;
> @@ -233,6 +233,17 @@ public final class TypeConverters {
> }
> 
> /**
> + * Converts a {@link String} into an {@link InetAddress}.
> + */
> +@Plugin(name = "InetAddress", category = CATEGORY)
> +public static class InetAddressConverter implements 
> TypeConverter {
> +@Override
> +public InetAddress convert(final String s) throws Exception {
> +return InetAddress.getByName(s);
> +}
> +}
> +
> +/**
>  * Converts a {@link String} into a {@link Integer}.
>  */
> @Plugin(name = "Integer", category = CATEGORY)
> 
> http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4254e255/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/validation/constraints/ValidHost.java
> --
> diff --git 
> a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/validation/constraints/ValidHost.java
>  
> b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/validation/constraints/ValidHost.java
> new file mode 100644
> index 000..c652d40
> --- /dev/null
> +++ 
> b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/validation/constraints/ValidHost.java
> @@ -0,0 +1,41 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements. See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache license, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License. You may obtain a copy of the License at
> + *
> + *  http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 

[jira] [Commented] (LOG4J2-1776) log4j-starter pom modules for dependency management

2017-01-09 Thread Ralph Goers (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15813291#comment-15813291
 ] 

Ralph Goers commented on LOG4J2-1776:
-

+1 for log4j-boot.

> log4j-starter pom modules for dependency management
> ---
>
> Key: LOG4J2-1776
> URL: https://issues.apache.org/jira/browse/LOG4J2-1776
> Project: Log4j 2
>  Issue Type: New Feature
>  Components: Starters
>Reporter: Matt Sicker
>
> This is the main feature for the Log4j Starter epic (LOG4J2-1775).
> {code}
> groupId: org.apache.logging.log4j.starter
> artifactId: log4j-starter-*
> {code}
> * core: just log4j-core basically
> * async (for AsyncLogger; brings in LMAX disruptor)
> * log4j-spi: log4j-slf4j-impl, log4j-jul, log4j-jcl, log4j-1.2-api
> * slf4j-spi: slf4j-impl, jcl-over-slf4j, jul-to-slf4j (same dependency set as 
> spring-boot-starter-log4j2)
> * logback (for log4j-to-slf4j, slf4j-spi, logback; this helps aid migration 
> to log4j-api and promotes it as a general use logging API)
> * appender-async-conversant
> * appender-async-jctools
> * appender-cassandra
> * appender-couchdb
> * appender-jms
> * appender-jpa
> * appender-kafka
> * appender-mongodb
> * appender-smtp
> * appender-zeromq
> * config-json
> * config-yaml
> * layout-csv
> * layout-jansi (for windows users and coloured log messages)
> * layout-json (unless this has been ported to not require jackson anymore?)
> * layout-xml
> * layout-yaml
> * script-groovy
> I may have missed a few, but the base set of starters should at least 
> correspond to all optional dependencies in log4j-core or the addon modules. 
> For the jms, jpa, and smtp (log4j-core) appenders, we could either make add 
> in a default provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) 
> or split those into provider-specific starters.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1776) log4j-starter pom modules for dependency management

2017-01-09 Thread Matt Sicker (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15813255#comment-15813255
 ] 

Matt Sicker commented on LOG4J2-1776:
-

For brevity's sake, "log4j-boot" is even better, plus it carries a connotation 
that's pretty easy to understand in the current Java ecosystem.

> log4j-starter pom modules for dependency management
> ---
>
> Key: LOG4J2-1776
> URL: https://issues.apache.org/jira/browse/LOG4J2-1776
> Project: Log4j 2
>  Issue Type: New Feature
>  Components: Starters
>Reporter: Matt Sicker
>
> This is the main feature for the Log4j Starter epic (LOG4J2-1775).
> {code}
> groupId: org.apache.logging.log4j.starter
> artifactId: log4j-starter-*
> {code}
> * core: just log4j-core basically
> * async (for AsyncLogger; brings in LMAX disruptor)
> * log4j-spi: log4j-slf4j-impl, log4j-jul, log4j-jcl, log4j-1.2-api
> * slf4j-spi: slf4j-impl, jcl-over-slf4j, jul-to-slf4j (same dependency set as 
> spring-boot-starter-log4j2)
> * logback (for log4j-to-slf4j, slf4j-spi, logback; this helps aid migration 
> to log4j-api and promotes it as a general use logging API)
> * appender-async-conversant
> * appender-async-jctools
> * appender-cassandra
> * appender-couchdb
> * appender-jms
> * appender-jpa
> * appender-kafka
> * appender-mongodb
> * appender-smtp
> * appender-zeromq
> * config-json
> * config-yaml
> * layout-csv
> * layout-jansi (for windows users and coloured log messages)
> * layout-json (unless this has been ported to not require jackson anymore?)
> * layout-xml
> * layout-yaml
> * script-groovy
> I may have missed a few, but the base set of starters should at least 
> correspond to all optional dependencies in log4j-core or the addon modules. 
> For the jms, jpa, and smtp (log4j-core) appenders, we could either make add 
> in a default provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) 
> or split those into provider-specific starters.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1768) MDC.clear() is broken in Log4j-1_2-api = 2.4

2017-01-09 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15813191#comment-15813191
 ] 

Gary Gregory commented on LOG4J2-1768:
--

Please do try 2.7.

Gary

> MDC.clear() is broken in Log4j-1_2-api = 2.4
> 
>
> Key: LOG4J2-1768
> URL: https://issues.apache.org/jira/browse/LOG4J2-1768
> Project: Log4j 2
>  Issue Type: Bug
>Affects Versions: 2.4
>Reporter: A
>Priority: Blocker
>
> MDC.clear() seems to be broken in Log4j-1_2-api = 2.4 as it is not clearing 
> the entries in MDC.
> Though, I have not tried in higher versions. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1776) log4j-starter pom modules for dependency management

2017-01-09 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15813100#comment-15813100
 ] 

Gary Gregory commented on LOG4J2-1776:
--

Would the prefix "log4j-start" also be acceptable? It's a wee bit shorter.

Gary

> log4j-starter pom modules for dependency management
> ---
>
> Key: LOG4J2-1776
> URL: https://issues.apache.org/jira/browse/LOG4J2-1776
> Project: Log4j 2
>  Issue Type: New Feature
>  Components: Starters
>Reporter: Matt Sicker
>
> This is the main feature for the Log4j Starter epic (LOG4J2-1775).
> {code}
> groupId: org.apache.logging.log4j.starter
> artifactId: log4j-starter-*
> {code}
> * core: just log4j-core basically
> * async (for AsyncLogger; brings in LMAX disruptor)
> * log4j-spi: log4j-slf4j-impl, log4j-jul, log4j-jcl, log4j-1.2-api
> * slf4j-spi: slf4j-impl, jcl-over-slf4j, jul-to-slf4j (same dependency set as 
> spring-boot-starter-log4j2)
> * logback (for log4j-to-slf4j, slf4j-spi, logback; this helps aid migration 
> to log4j-api and promotes it as a general use logging API)
> * appender-async-conversant
> * appender-async-jctools
> * appender-cassandra
> * appender-couchdb
> * appender-jms
> * appender-jpa
> * appender-kafka
> * appender-mongodb
> * appender-smtp
> * appender-zeromq
> * config-json
> * config-yaml
> * layout-csv
> * layout-jansi (for windows users and coloured log messages)
> * layout-json (unless this has been ported to not require jackson anymore?)
> * layout-xml
> * layout-yaml
> * script-groovy
> I may have missed a few, but the base set of starters should at least 
> correspond to all optional dependencies in log4j-core or the addon modules. 
> For the jms, jpa, and smtp (log4j-core) appenders, we could either make add 
> in a default provider (e.g., ActiveMQ, Hibernate, and Sun Mail respectively) 
> or split those into provider-specific starters.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1713) Allow for more general serialization of Log4j2 configurations

2017-01-09 Thread Kurt Seidel (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15812998#comment-15812998
 ] 

Kurt Seidel commented on LOG4J2-1713:
-

Thanks for the reply. I think that answers my question. I am using the default 
ClassLoaderContextSelector, and as you point out, and as I have found, this 
only allows a single LoggerContext per ClassLoader. Most of our logging is done 
within the context of webapps, where each webapp has it's own log 
configuration, and the log4j2 jar files are bundled into the webapp's 
WEB-INF/lib. Creating a customized ContextSelector to solve my problem sounds 
like it would interfere with the ClassLoaderContextSelector required for proper 
isolated webapp logging, since this custom ContextSelector class is specified 
at the system level. I will likely go with using the Composite Configuration to 
deal with the common jars.

> Allow for more general serialization of Log4j2 configurations
> -
>
> Key: LOG4J2-1713
> URL: https://issues.apache.org/jira/browse/LOG4J2-1713
> Project: Log4j 2
>  Issue Type: New Feature
>  Components: Configurators
>Affects Versions: 2.7
>Reporter: Steve Cohen
>
> We want to implement the following system:
> We would like to write an external program that reads several Log4j 
> Configuration Files, combines the configurations, and then outputs the 
> combined configuration to a new Log4j configuration file. This file can then 
> simply be dropped on a running log4j instance on a server, and cause an 
> update of the running configuration.
> Existing APIs do not support this use case.  There is nothing that supports 
> the serialization to XML of a loaded configuration.  There is the new 
> ConfigurationBuilder.writeToXml() method in 2.7, but that's on 
> ConfigurationBuilder, not Configuration.  Nor is it possible to take a 
> Configuration, and get a ConfigurationBuilder from it.  Another way it could 
> work is having some sort of ConfigurationBuilder that accepted parameters of 
> type Logger, Appender, etc. These would enable Loggers and Appenders and 
> other Log4j2 objects to be copied from an existing configuration to a new one 
> being built.  But this doesn't exist either.  One would have to drill down 
> into each component, extract the necessary data, and add it to a builder.
> In other words (H/T to Gary Gregory)
> c1 = load config from XML file 1 (but do not apply the c1 configuration)
> c2 = load config from XML file 2 (but do not apply the c2 configuration)
> c3 = c1 + c2 (but do not apply the c3 configuration) write c3 to disk
> In case you wonder, there is actually a use case behind this:
> Imagine a Servlet web-app that, depending on request parameters, invokes one 
> of a number of possible EJBs (they could also be non-EJB POJOs, but for the 
> purposes of this discussion, we assume EJBs), in order to produce a response. 
>  This is not a shopping cart but a back end system.  We do NOT wish to deploy 
> these into a single EAR file but want separate deployment of each component, 
> and each component to have a separate logging configuration, deployable at 
> the same time as the component.  Since Log4j allows only one configuration 
> context per class-loader, the ideal scheme would be there can only be one 
> configuration file.  The only way to update it non-programatically is to drop 
> a new configuration in the correct location.  In order to produce this, we 
> would like the separate logging configs deployed to some directory.  A 
> separate program would read in all of these and add the loggers and appenders 
> to a new master configuration which would then be written out to disk and 
> copied to the proper location.  The usual change mechanism would then load 
> the new configuration.  The current configuration of the running system would 
> always match what is in this master configuration file, which is not the case 
> with programmatic configuration.
> Without something like this, how is it possible to run multiple EJBs out of a 
> web-app that are separately deployable and have separately manageable logging 
> configurations?
> One could manually of course parse the individual files on the XML level (or 
> JSON, YAML, whatever), combine them, and serialize the output.  But since 
> log4j knows its own object model better than any xml parser, it makes sense 
> to have this capability within log4j.
> And yes, I've thought of the fact that property-name, logger-name, 
> appender-name collisions are possible and could cause trouble.  I would be 
> prepared to live with real restrictions that prevent this.  I don't think 
> there is any need to support concatenation of random config files that do not 
> prevent such collisions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LOG4J2-1640) RollingFileAppender with CronTriggeringPolicy broken?

2017-01-09 Thread Matt Sicker (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15812875#comment-15812875
 ] 

Matt Sicker commented on LOG4J2-1640:
-

Oh ok, got it.

> RollingFileAppender with CronTriggeringPolicy broken?
> -
>
> Key: LOG4J2-1640
> URL: https://issues.apache.org/jira/browse/LOG4J2-1640
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.7
> Environment: Mac OS X 10.11.6 running Eclipse Neon 4.6.0 with JDK 
> 1.8.0_74
>Reporter: Chris McGee
>  Labels: CronTriggeringPolicy, RollingFile, RollingFileAppender, 
> newbie
> Fix For: 2.8
>
>
> If this isn't actually a bug, then I apologize for reporting it, but I cannot 
> figure out how it could be anything else currently. Full disclosure: I am 
> still a newbie.
> I've been using the log4j 2.6.x series for a while, but noticed that the 
> CronTriggeringPolicy when used with RollingFileAppender causes that infinite 
> rollover bug. I noted that this bug was to be fixed in 2.7, so I downloaded 
> that the day it was released and replaced the 2.6 version with it. Now, 
> however, without changing anything else in my code nor in my log4j2.xml file, 
> I am getting exceptions regarding them.
> Here's the interesting bit: Since I was trying to see if the rollover would 
> occur at midnight, I manually changed my computer's clock to just  a minute 
> before, logged some info, let it roll to past midnight, and let it log some 
> more info. All of that info got logged into the main file; nothing rolled 
> over. Here's the stacktrace from that execution:
> {noformat}
> 2016-10-10 09:40:47,521 main DEBUG Initializing configuration 
> XmlConfiguration[location=/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml]
> 2016-10-10 09:40:47,526 main DEBUG Installed script engines
> 2016-10-10 09:40:47,955 main DEBUG Oracle Nashorn Version: 1.8.0_74, 
> Language: ECMAScript, Threading: Not Thread Safe, Compile: true, Names: 
> {nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript}
> 2016-10-10 09:40:48,307 main DEBUG AppleScriptEngine Version: 1.1, Language: 
> AppleScript, Threading: Not Thread Safe, Compile: false, Names: 
> {AppleScriptEngine, AppleScript, OSA}
> 2016-10-10 09:40:48,308 main DEBUG PluginManager 'Core' found 107 plugins
> 2016-10-10 09:40:48,308 main DEBUG PluginManager 'Level' found 0 plugins
> 2016-10-10 09:40:48,312 main DEBUG 2 starting Log4j2 ConfigurationScheduler 
> threads
> 2016-10-10 09:40:48,314 main DEBUG Building Plugin[name=property, 
> class=org.apache.logging.log4j.core.config.Property].
> 2016-10-10 09:40:48,323 main TRACE TypeConverterRegistry initializing.
> 2016-10-10 09:40:48,324 main DEBUG PluginManager 'TypeConverter' found 23 
> plugins
> 2016-10-10 09:40:48,330 main DEBUG createProperty(name="filename", 
> value="logs/artdept.log")
> 2016-10-10 09:40:48,330 main DEBUG Building Plugin[name=property, 
> class=org.apache.logging.log4j.core.config.Property].
> 2016-10-10 09:40:48,331 main DEBUG createProperty(name="baseDir", 
> value="/Volumes/ArtDept/ArtDept/Scripts/sky-artdept/logs")
> 2016-10-10 09:40:48,331 main DEBUG Building Plugin[name=properties, 
> class=org.apache.logging.log4j.core.config.PropertiesPlugin].
> 2016-10-10 09:40:48,334 main DEBUG 
> configureSubstitutor(={filename=logs/artdept.log, 
> baseDir=/Volumes/ArtDept/ArtDept/Scripts/sky-artdept/logs}, 
> Configuration(/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml))
> 2016-10-10 09:40:48,335 main DEBUG PluginManager 'Lookup' found 13 plugins
> 2016-10-10 09:40:48,335 main DEBUG Building Plugin[name=layout, 
> class=org.apache.logging.log4j.core.layout.PatternLayout].
> 2016-10-10 09:40:48,341 main DEBUG 
> PatternLayout$Builder(pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - 
> %msg%n", PatternSelector=null, 
> Configuration(/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml),
>  Replace=null, charset="null", alwaysWriteExceptions="null", 
> noConsoleNoAnsi="null", header="null", footer="null")
> 2016-10-10 09:40:48,341 main DEBUG PluginManager 'Converter' found 41 plugins
> 2016-10-10 09:40:48,342 main DEBUG Building Plugin[name=appender, 
> class=org.apache.logging.log4j.core.appender.ConsoleAppender].
> 2016-10-10 09:40:48,347 main DEBUG 
> ConsoleAppender$Builder(target="SYSTEM_OUT", follow="null", direct="null", 
> bufferedIo="null", bufferSize="null", immediateFlush="null", 
> ignoreExceptions="null", PatternLayout(%d{HH:mm:ss.SSS} [%t] %-5level 
> %logger{36} - %msg%n), name="Console", Filter=null)
> 2016-10-10 09:40:48,347 main DEBUG Starting OutputStreamManager 
> SYSTEM_OUT.false.false
> 2016-10-10 09:40:48,348 main DEBUG Building Plugin[name=layout, 
> class=org.apache.logging.log4j.core.layout.PatternLayout].
> 

[jira] [Commented] (LOG4J2-1640) RollingFileAppender with CronTriggeringPolicy broken?

2017-01-09 Thread Ralph Goers (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15812841#comment-15812841
 ] 

Ralph Goers commented on LOG4J2-1640:
-

No. As I said, System.nanotime() is relative to the time the server started 
whereas Date and System.currentTimeMillis() are relative to the epoch.  There 
is no accurate way to coordinate them.

> RollingFileAppender with CronTriggeringPolicy broken?
> -
>
> Key: LOG4J2-1640
> URL: https://issues.apache.org/jira/browse/LOG4J2-1640
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.7
> Environment: Mac OS X 10.11.6 running Eclipse Neon 4.6.0 with JDK 
> 1.8.0_74
>Reporter: Chris McGee
>  Labels: CronTriggeringPolicy, RollingFile, RollingFileAppender, 
> newbie
> Fix For: 2.8
>
>
> If this isn't actually a bug, then I apologize for reporting it, but I cannot 
> figure out how it could be anything else currently. Full disclosure: I am 
> still a newbie.
> I've been using the log4j 2.6.x series for a while, but noticed that the 
> CronTriggeringPolicy when used with RollingFileAppender causes that infinite 
> rollover bug. I noted that this bug was to be fixed in 2.7, so I downloaded 
> that the day it was released and replaced the 2.6 version with it. Now, 
> however, without changing anything else in my code nor in my log4j2.xml file, 
> I am getting exceptions regarding them.
> Here's the interesting bit: Since I was trying to see if the rollover would 
> occur at midnight, I manually changed my computer's clock to just  a minute 
> before, logged some info, let it roll to past midnight, and let it log some 
> more info. All of that info got logged into the main file; nothing rolled 
> over. Here's the stacktrace from that execution:
> {noformat}
> 2016-10-10 09:40:47,521 main DEBUG Initializing configuration 
> XmlConfiguration[location=/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml]
> 2016-10-10 09:40:47,526 main DEBUG Installed script engines
> 2016-10-10 09:40:47,955 main DEBUG Oracle Nashorn Version: 1.8.0_74, 
> Language: ECMAScript, Threading: Not Thread Safe, Compile: true, Names: 
> {nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript}
> 2016-10-10 09:40:48,307 main DEBUG AppleScriptEngine Version: 1.1, Language: 
> AppleScript, Threading: Not Thread Safe, Compile: false, Names: 
> {AppleScriptEngine, AppleScript, OSA}
> 2016-10-10 09:40:48,308 main DEBUG PluginManager 'Core' found 107 plugins
> 2016-10-10 09:40:48,308 main DEBUG PluginManager 'Level' found 0 plugins
> 2016-10-10 09:40:48,312 main DEBUG 2 starting Log4j2 ConfigurationScheduler 
> threads
> 2016-10-10 09:40:48,314 main DEBUG Building Plugin[name=property, 
> class=org.apache.logging.log4j.core.config.Property].
> 2016-10-10 09:40:48,323 main TRACE TypeConverterRegistry initializing.
> 2016-10-10 09:40:48,324 main DEBUG PluginManager 'TypeConverter' found 23 
> plugins
> 2016-10-10 09:40:48,330 main DEBUG createProperty(name="filename", 
> value="logs/artdept.log")
> 2016-10-10 09:40:48,330 main DEBUG Building Plugin[name=property, 
> class=org.apache.logging.log4j.core.config.Property].
> 2016-10-10 09:40:48,331 main DEBUG createProperty(name="baseDir", 
> value="/Volumes/ArtDept/ArtDept/Scripts/sky-artdept/logs")
> 2016-10-10 09:40:48,331 main DEBUG Building Plugin[name=properties, 
> class=org.apache.logging.log4j.core.config.PropertiesPlugin].
> 2016-10-10 09:40:48,334 main DEBUG 
> configureSubstitutor(={filename=logs/artdept.log, 
> baseDir=/Volumes/ArtDept/ArtDept/Scripts/sky-artdept/logs}, 
> Configuration(/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml))
> 2016-10-10 09:40:48,335 main DEBUG PluginManager 'Lookup' found 13 plugins
> 2016-10-10 09:40:48,335 main DEBUG Building Plugin[name=layout, 
> class=org.apache.logging.log4j.core.layout.PatternLayout].
> 2016-10-10 09:40:48,341 main DEBUG 
> PatternLayout$Builder(pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - 
> %msg%n", PatternSelector=null, 
> Configuration(/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml),
>  Replace=null, charset="null", alwaysWriteExceptions="null", 
> noConsoleNoAnsi="null", header="null", footer="null")
> 2016-10-10 09:40:48,341 main DEBUG PluginManager 'Converter' found 41 plugins
> 2016-10-10 09:40:48,342 main DEBUG Building Plugin[name=appender, 
> class=org.apache.logging.log4j.core.appender.ConsoleAppender].
> 2016-10-10 09:40:48,347 main DEBUG 
> ConsoleAppender$Builder(target="SYSTEM_OUT", follow="null", direct="null", 
> bufferedIo="null", bufferSize="null", immediateFlush="null", 
> ignoreExceptions="null", PatternLayout(%d{HH:mm:ss.SSS} [%t] %-5level 
> %logger{36} - %msg%n), name="Console", Filter=null)
> 2016-10-10 09:40:48,347 main DEBUG Starting 

[jira] [Commented] (LOG4J2-1640) RollingFileAppender with CronTriggeringPolicy broken?

2017-01-09 Thread Matt Sicker (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15812770#comment-15812770
 ] 

Matt Sicker commented on LOG4J2-1640:
-

Couldn't you use {{new Date(TimeUnit.NANOS.toMillis(nanoValue))}} or something 
like that?

> RollingFileAppender with CronTriggeringPolicy broken?
> -
>
> Key: LOG4J2-1640
> URL: https://issues.apache.org/jira/browse/LOG4J2-1640
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.7
> Environment: Mac OS X 10.11.6 running Eclipse Neon 4.6.0 with JDK 
> 1.8.0_74
>Reporter: Chris McGee
>  Labels: CronTriggeringPolicy, RollingFile, RollingFileAppender, 
> newbie
> Fix For: 2.8
>
>
> If this isn't actually a bug, then I apologize for reporting it, but I cannot 
> figure out how it could be anything else currently. Full disclosure: I am 
> still a newbie.
> I've been using the log4j 2.6.x series for a while, but noticed that the 
> CronTriggeringPolicy when used with RollingFileAppender causes that infinite 
> rollover bug. I noted that this bug was to be fixed in 2.7, so I downloaded 
> that the day it was released and replaced the 2.6 version with it. Now, 
> however, without changing anything else in my code nor in my log4j2.xml file, 
> I am getting exceptions regarding them.
> Here's the interesting bit: Since I was trying to see if the rollover would 
> occur at midnight, I manually changed my computer's clock to just  a minute 
> before, logged some info, let it roll to past midnight, and let it log some 
> more info. All of that info got logged into the main file; nothing rolled 
> over. Here's the stacktrace from that execution:
> {noformat}
> 2016-10-10 09:40:47,521 main DEBUG Initializing configuration 
> XmlConfiguration[location=/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml]
> 2016-10-10 09:40:47,526 main DEBUG Installed script engines
> 2016-10-10 09:40:47,955 main DEBUG Oracle Nashorn Version: 1.8.0_74, 
> Language: ECMAScript, Threading: Not Thread Safe, Compile: true, Names: 
> {nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript}
> 2016-10-10 09:40:48,307 main DEBUG AppleScriptEngine Version: 1.1, Language: 
> AppleScript, Threading: Not Thread Safe, Compile: false, Names: 
> {AppleScriptEngine, AppleScript, OSA}
> 2016-10-10 09:40:48,308 main DEBUG PluginManager 'Core' found 107 plugins
> 2016-10-10 09:40:48,308 main DEBUG PluginManager 'Level' found 0 plugins
> 2016-10-10 09:40:48,312 main DEBUG 2 starting Log4j2 ConfigurationScheduler 
> threads
> 2016-10-10 09:40:48,314 main DEBUG Building Plugin[name=property, 
> class=org.apache.logging.log4j.core.config.Property].
> 2016-10-10 09:40:48,323 main TRACE TypeConverterRegistry initializing.
> 2016-10-10 09:40:48,324 main DEBUG PluginManager 'TypeConverter' found 23 
> plugins
> 2016-10-10 09:40:48,330 main DEBUG createProperty(name="filename", 
> value="logs/artdept.log")
> 2016-10-10 09:40:48,330 main DEBUG Building Plugin[name=property, 
> class=org.apache.logging.log4j.core.config.Property].
> 2016-10-10 09:40:48,331 main DEBUG createProperty(name="baseDir", 
> value="/Volumes/ArtDept/ArtDept/Scripts/sky-artdept/logs")
> 2016-10-10 09:40:48,331 main DEBUG Building Plugin[name=properties, 
> class=org.apache.logging.log4j.core.config.PropertiesPlugin].
> 2016-10-10 09:40:48,334 main DEBUG 
> configureSubstitutor(={filename=logs/artdept.log, 
> baseDir=/Volumes/ArtDept/ArtDept/Scripts/sky-artdept/logs}, 
> Configuration(/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml))
> 2016-10-10 09:40:48,335 main DEBUG PluginManager 'Lookup' found 13 plugins
> 2016-10-10 09:40:48,335 main DEBUG Building Plugin[name=layout, 
> class=org.apache.logging.log4j.core.layout.PatternLayout].
> 2016-10-10 09:40:48,341 main DEBUG 
> PatternLayout$Builder(pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - 
> %msg%n", PatternSelector=null, 
> Configuration(/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml),
>  Replace=null, charset="null", alwaysWriteExceptions="null", 
> noConsoleNoAnsi="null", header="null", footer="null")
> 2016-10-10 09:40:48,341 main DEBUG PluginManager 'Converter' found 41 plugins
> 2016-10-10 09:40:48,342 main DEBUG Building Plugin[name=appender, 
> class=org.apache.logging.log4j.core.appender.ConsoleAppender].
> 2016-10-10 09:40:48,347 main DEBUG 
> ConsoleAppender$Builder(target="SYSTEM_OUT", follow="null", direct="null", 
> bufferedIo="null", bufferSize="null", immediateFlush="null", 
> ignoreExceptions="null", PatternLayout(%d{HH:mm:ss.SSS} [%t] %-5level 
> %logger{36} - %msg%n), name="Console", Filter=null)
> 2016-10-10 09:40:48,347 main DEBUG Starting OutputStreamManager 
> SYSTEM_OUT.false.false
> 2016-10-10 09:40:48,348 main DEBUG Building 

Jenkins build is still unstable: Log4j 2.x #2590

2017-01-09 Thread Apache Jenkins Server
See 


-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Resolved] (LOG4J2-1640) RollingFileAppender with CronTriggeringPolicy broken?

2017-01-09 Thread Ralph Goers (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ralph Goers resolved LOG4J2-1640.
-
   Resolution: Fixed
Fix Version/s: 2.8

Please verify and close.

> RollingFileAppender with CronTriggeringPolicy broken?
> -
>
> Key: LOG4J2-1640
> URL: https://issues.apache.org/jira/browse/LOG4J2-1640
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.7
> Environment: Mac OS X 10.11.6 running Eclipse Neon 4.6.0 with JDK 
> 1.8.0_74
>Reporter: Chris McGee
>  Labels: CronTriggeringPolicy, RollingFile, RollingFileAppender, 
> newbie
> Fix For: 2.8
>
>
> If this isn't actually a bug, then I apologize for reporting it, but I cannot 
> figure out how it could be anything else currently. Full disclosure: I am 
> still a newbie.
> I've been using the log4j 2.6.x series for a while, but noticed that the 
> CronTriggeringPolicy when used with RollingFileAppender causes that infinite 
> rollover bug. I noted that this bug was to be fixed in 2.7, so I downloaded 
> that the day it was released and replaced the 2.6 version with it. Now, 
> however, without changing anything else in my code nor in my log4j2.xml file, 
> I am getting exceptions regarding them.
> Here's the interesting bit: Since I was trying to see if the rollover would 
> occur at midnight, I manually changed my computer's clock to just  a minute 
> before, logged some info, let it roll to past midnight, and let it log some 
> more info. All of that info got logged into the main file; nothing rolled 
> over. Here's the stacktrace from that execution:
> {noformat}
> 2016-10-10 09:40:47,521 main DEBUG Initializing configuration 
> XmlConfiguration[location=/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml]
> 2016-10-10 09:40:47,526 main DEBUG Installed script engines
> 2016-10-10 09:40:47,955 main DEBUG Oracle Nashorn Version: 1.8.0_74, 
> Language: ECMAScript, Threading: Not Thread Safe, Compile: true, Names: 
> {nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript}
> 2016-10-10 09:40:48,307 main DEBUG AppleScriptEngine Version: 1.1, Language: 
> AppleScript, Threading: Not Thread Safe, Compile: false, Names: 
> {AppleScriptEngine, AppleScript, OSA}
> 2016-10-10 09:40:48,308 main DEBUG PluginManager 'Core' found 107 plugins
> 2016-10-10 09:40:48,308 main DEBUG PluginManager 'Level' found 0 plugins
> 2016-10-10 09:40:48,312 main DEBUG 2 starting Log4j2 ConfigurationScheduler 
> threads
> 2016-10-10 09:40:48,314 main DEBUG Building Plugin[name=property, 
> class=org.apache.logging.log4j.core.config.Property].
> 2016-10-10 09:40:48,323 main TRACE TypeConverterRegistry initializing.
> 2016-10-10 09:40:48,324 main DEBUG PluginManager 'TypeConverter' found 23 
> plugins
> 2016-10-10 09:40:48,330 main DEBUG createProperty(name="filename", 
> value="logs/artdept.log")
> 2016-10-10 09:40:48,330 main DEBUG Building Plugin[name=property, 
> class=org.apache.logging.log4j.core.config.Property].
> 2016-10-10 09:40:48,331 main DEBUG createProperty(name="baseDir", 
> value="/Volumes/ArtDept/ArtDept/Scripts/sky-artdept/logs")
> 2016-10-10 09:40:48,331 main DEBUG Building Plugin[name=properties, 
> class=org.apache.logging.log4j.core.config.PropertiesPlugin].
> 2016-10-10 09:40:48,334 main DEBUG 
> configureSubstitutor(={filename=logs/artdept.log, 
> baseDir=/Volumes/ArtDept/ArtDept/Scripts/sky-artdept/logs}, 
> Configuration(/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml))
> 2016-10-10 09:40:48,335 main DEBUG PluginManager 'Lookup' found 13 plugins
> 2016-10-10 09:40:48,335 main DEBUG Building Plugin[name=layout, 
> class=org.apache.logging.log4j.core.layout.PatternLayout].
> 2016-10-10 09:40:48,341 main DEBUG 
> PatternLayout$Builder(pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - 
> %msg%n", PatternSelector=null, 
> Configuration(/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml),
>  Replace=null, charset="null", alwaysWriteExceptions="null", 
> noConsoleNoAnsi="null", header="null", footer="null")
> 2016-10-10 09:40:48,341 main DEBUG PluginManager 'Converter' found 41 plugins
> 2016-10-10 09:40:48,342 main DEBUG Building Plugin[name=appender, 
> class=org.apache.logging.log4j.core.appender.ConsoleAppender].
> 2016-10-10 09:40:48,347 main DEBUG 
> ConsoleAppender$Builder(target="SYSTEM_OUT", follow="null", direct="null", 
> bufferedIo="null", bufferSize="null", immediateFlush="null", 
> ignoreExceptions="null", PatternLayout(%d{HH:mm:ss.SSS} [%t] %-5level 
> %logger{36} - %msg%n), name="Console", Filter=null)
> 2016-10-10 09:40:48,347 main DEBUG Starting OutputStreamManager 
> SYSTEM_OUT.false.false
> 2016-10-10 09:40:48,348 main DEBUG Building Plugin[name=layout, 
> 

[jira] [Commented] (LOG4J2-1640) RollingFileAppender with CronTriggeringPolicy broken?

2017-01-09 Thread Ralph Goers (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15812045#comment-15812045
 ] 

Ralph Goers commented on LOG4J2-1640:
-

So it turns out that the ScheduledExecutorServices in Java use 
System.nanotime() which, of course, has nothing to do with the actual time of 
day. The nanotime clock is updated more frequently than the currentTimeMiillis 
clock and so it is possible for an event to fire early. It doesn't appear there 
is a good way to determine the delay interval since there is no way to 
associate a Date value with the nanotime clock. Adding a sleep to the run 
method to handle the case where it is fired early has fixed the problem.

> RollingFileAppender with CronTriggeringPolicy broken?
> -
>
> Key: LOG4J2-1640
> URL: https://issues.apache.org/jira/browse/LOG4J2-1640
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.7
> Environment: Mac OS X 10.11.6 running Eclipse Neon 4.6.0 with JDK 
> 1.8.0_74
>Reporter: Chris McGee
>  Labels: CronTriggeringPolicy, RollingFile, RollingFileAppender, 
> newbie
>
> If this isn't actually a bug, then I apologize for reporting it, but I cannot 
> figure out how it could be anything else currently. Full disclosure: I am 
> still a newbie.
> I've been using the log4j 2.6.x series for a while, but noticed that the 
> CronTriggeringPolicy when used with RollingFileAppender causes that infinite 
> rollover bug. I noted that this bug was to be fixed in 2.7, so I downloaded 
> that the day it was released and replaced the 2.6 version with it. Now, 
> however, without changing anything else in my code nor in my log4j2.xml file, 
> I am getting exceptions regarding them.
> Here's the interesting bit: Since I was trying to see if the rollover would 
> occur at midnight, I manually changed my computer's clock to just  a minute 
> before, logged some info, let it roll to past midnight, and let it log some 
> more info. All of that info got logged into the main file; nothing rolled 
> over. Here's the stacktrace from that execution:
> {noformat}
> 2016-10-10 09:40:47,521 main DEBUG Initializing configuration 
> XmlConfiguration[location=/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml]
> 2016-10-10 09:40:47,526 main DEBUG Installed script engines
> 2016-10-10 09:40:47,955 main DEBUG Oracle Nashorn Version: 1.8.0_74, 
> Language: ECMAScript, Threading: Not Thread Safe, Compile: true, Names: 
> {nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript}
> 2016-10-10 09:40:48,307 main DEBUG AppleScriptEngine Version: 1.1, Language: 
> AppleScript, Threading: Not Thread Safe, Compile: false, Names: 
> {AppleScriptEngine, AppleScript, OSA}
> 2016-10-10 09:40:48,308 main DEBUG PluginManager 'Core' found 107 plugins
> 2016-10-10 09:40:48,308 main DEBUG PluginManager 'Level' found 0 plugins
> 2016-10-10 09:40:48,312 main DEBUG 2 starting Log4j2 ConfigurationScheduler 
> threads
> 2016-10-10 09:40:48,314 main DEBUG Building Plugin[name=property, 
> class=org.apache.logging.log4j.core.config.Property].
> 2016-10-10 09:40:48,323 main TRACE TypeConverterRegistry initializing.
> 2016-10-10 09:40:48,324 main DEBUG PluginManager 'TypeConverter' found 23 
> plugins
> 2016-10-10 09:40:48,330 main DEBUG createProperty(name="filename", 
> value="logs/artdept.log")
> 2016-10-10 09:40:48,330 main DEBUG Building Plugin[name=property, 
> class=org.apache.logging.log4j.core.config.Property].
> 2016-10-10 09:40:48,331 main DEBUG createProperty(name="baseDir", 
> value="/Volumes/ArtDept/ArtDept/Scripts/sky-artdept/logs")
> 2016-10-10 09:40:48,331 main DEBUG Building Plugin[name=properties, 
> class=org.apache.logging.log4j.core.config.PropertiesPlugin].
> 2016-10-10 09:40:48,334 main DEBUG 
> configureSubstitutor(={filename=logs/artdept.log, 
> baseDir=/Volumes/ArtDept/ArtDept/Scripts/sky-artdept/logs}, 
> Configuration(/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml))
> 2016-10-10 09:40:48,335 main DEBUG PluginManager 'Lookup' found 13 plugins
> 2016-10-10 09:40:48,335 main DEBUG Building Plugin[name=layout, 
> class=org.apache.logging.log4j.core.layout.PatternLayout].
> 2016-10-10 09:40:48,341 main DEBUG 
> PatternLayout$Builder(pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - 
> %msg%n", PatternSelector=null, 
> Configuration(/Users/apache/Dropbox/eclipse/workspace/ArtDept/bin/log4j2.xml),
>  Replace=null, charset="null", alwaysWriteExceptions="null", 
> noConsoleNoAnsi="null", header="null", footer="null")
> 2016-10-10 09:40:48,341 main DEBUG PluginManager 'Converter' found 41 plugins
> 2016-10-10 09:40:48,342 main DEBUG Building Plugin[name=appender, 
> class=org.apache.logging.log4j.core.appender.ConsoleAppender].
> 2016-10-10 09:40:48,347 main DEBUG 
> 

Re: Property vs. KeyValuePair

2017-01-09 Thread Matt Sicker
Properties are automatically interpolated and used as interpolatable values
while KeyValuePairs are not (at least IIRC). Basically, it seems to be a
semantic difference.

On 9 January 2017 at 04:43, Remko Popma  wrote:

> They seem similar, but slightly different usage: KeyValuePair is used in
> Filters and Layouts (via LoggerFields), where Property is used in
> Configuration and some Appenders.
>
> Otherwise they seem structurally very similar.
>
> Some historical reason?
>
> Sent from my iPhone
>
> > On Jan 9, 2017, at 17:54, Mikael Ståldal 
> wrote:
> >
> > What is the difference between classes Property and KeyValuePair?
>
> -
> To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-dev-h...@logging.apache.org
>
>


-- 
Matt Sicker 


Re: Property vs. KeyValuePair

2017-01-09 Thread Remko Popma
They seem similar, but slightly different usage: KeyValuePair is used in 
Filters and Layouts (via LoggerFields), where Property is used in Configuration 
and some Appenders. 

Otherwise they seem structurally very similar. 

Some historical reason?

Sent from my iPhone

> On Jan 9, 2017, at 17:54, Mikael Ståldal  wrote:
> 
> What is the difference between classes Property and KeyValuePair?

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



Re: Bug in Async Logger?

2017-01-09 Thread Remko Popma
Should be contextData.put(prop.getName(), value);
I can fix it. 

Sent from my iPhone

> On Jan 9, 2017, at 19:27, Mikael Ståldal  wrote:
> 
> Will you fix it? I am not sure I know how it is supposed to be.
> 
>> On Jan 9, 2017 10:10 AM, "Remko Popma"  wrote:
>> Yes that's a bug.
>> Well spotted!
>> 
>> Sent from my iPhone
>> 
>> > On Jan 9, 2017, at 17:50, Mikael Ståldal  wrote:
>> >
>> > Have a look at AsyncLogger.java 328-331. "value" is not used, is that 
>> > correct?
>> 
>> -
>> To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-dev-h...@logging.apache.org
>> 


Re: Bug in Async Logger?

2017-01-09 Thread Mikael Ståldal
Will you fix it? I am not sure I know how it is supposed to be.

On Jan 9, 2017 10:10 AM, "Remko Popma"  wrote:

> Yes that's a bug.
> Well spotted!
>
> Sent from my iPhone
>
> > On Jan 9, 2017, at 17:50, Mikael Ståldal 
> wrote:
> >
> > Have a look at AsyncLogger.java 328-331. "value" is not used, is that
> correct?
>
> -
> To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-dev-h...@logging.apache.org
>
>


Jenkins build is still unstable: Log4j 2.x #2589

2017-01-09 Thread Apache Jenkins Server
See 


-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-09 Thread Remko Popma (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15811361#comment-15811361
 ] 

Remko Popma commented on LOG4J2-1724:
-

Nice!

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1748) RollingFile appender prevents a stand alone application to terminate for as long as 60 sec

2017-01-09 Thread Remko Popma (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15811186#comment-15811186
 ] 

Remko Popma commented on LOG4J2-1748:
-

I think it's a good idea to use the {{config.getShutdownTimeoutMillis}} for the 
ExecutorService also. As long as we use minimum 1 sec, that should be okay. I 
am just swamped with work and don't have time to make these changes.

> RollingFile appender prevents a stand alone application to terminate for as 
> long as 60 sec
> --
>
> Key: LOG4J2-1748
> URL: https://issues.apache.org/jira/browse/LOG4J2-1748
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.7
> Environment: Java8, Windows
>Reporter: Daniele Demichelis
>Assignee: Remko Popma
>  Labels: RollingFile, bug
> Fix For: 2.8
>
>
> This code reproduces what I think is a bug of Log4j2.
> It's a simple loop that logs 2000 messages with two appenders:
> a console appender and a rolling file appender that rolls the file
> every 5Kb. This limit is intentionally low to reproduce what I think is a bug.
> Here's the code.
> {code:java}
> package bug;
> 
> import org.apache.logging.log4j.LogManager;
> import org.apache.logging.log4j.Logger;
> 
> public class Example {
> 
> private static final Logger logger = 
> LogManager.getLogger(Example.class);
> 
> public static void main(String[] args) throws InterruptedException {
> for(int i = 0; i<2000; i++){
> logger.info("This is log message #{}.", i);
> Thread.sleep(0);
> }
> }
> 
> }
> {code}
> Here's the `log4j2.xml` configuration file.
> {code:xml}
> 
> 
> 
> 
> 
> 
>   fileName="target/log4j2/roll-by-size/app.log"
>  
> filePattern="target/log4j2/roll-by-size/app.%i.log.gz"
>  ignoreExceptions="false"
>  append="false">
> 
> %d{-MM-dd HH:mm:ss} %p %m%n
> 
> 
> 
>  size="5 KB"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> {code}
> What is strange is that when the application is launched you will see this 
> logs in the console.
> {code}
> 2016-12-22 22:12:36 INFO This is log message #1993.
> 2016-12-22 22:12:36 INFO This is log message #1994.
> 2016-12-22 22:12:36 INFO This is log message #1995.
> 2016-12-22 22:12:36 INFO This is log message #1996.
> 2016-12-22 22:12:36 INFO This is log message #1997.
> 2016-12-22 22:12:36 INFO This is log message #1998.
> 2016-12-22 22:12:36 INFO This is log message #1999.
> 2016-12-22 22:13:36,380 pool-1-thread-1 DEBUG Stopping 
> LoggerContext[name=60199c81, 
> org.apache.logging.log4j.core.LoggerContext@4597ec68]
> 2016-12-22 22:13:36,380 pool-1-thread-1 DEBUG Stopping 
> LoggerContext[name=60199c81, 
> org.apache.logging.log4j.core.LoggerContext@4597ec68]...
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=StatusLogger]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=ContextSelector]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 2 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=Loggers,name=bug, 
> org.apache.logging.log4j2:type=60199c81,component=Lo
> ggers,name=]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 2 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=Appenders,name=roll-by-size,
>  org.apache.logging.log4j2:type=60199c81,c
> omponent=Appenders,name=stdout]
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no MBeans 
> found matching 
> 'org.apache.logging.log4j2:type=60199c81,component=AsyncAppenders,name=*'
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no MBeans 
> found matching 
> 'org.apache.logging.log4j2:type=60199c81,component=AsyncLoggerRingBuffer'
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no MBeans 
> found matching 
> 'org.apache.logging.log4j2:type=60199c81,component=Loggers,name=*,subtype=RingBuffer'
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Stopping 
> 

[jira] [Commented] (LOG4J2-1748) RollingFile appender prevents a stand alone application to terminate for as long as 60 sec

2017-01-09 Thread Remko Popma (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15811165#comment-15811165
 ] 

Remko Popma commented on LOG4J2-1748:
-

... and another good catch! Two actually.

LoggerContext.setConfiguration: I was looking at the code on my phone during 
the commute and I missed that. Yes, Executors are initialized during 
setConfiguration so they should be able to use 
{{config.getShutdownTimeoutMillis}}. By the way, looks like that value is zero 
if users don't specify anything. Zero is not a good threadpool timeout value 
(it is reasonable to let Threads live for at least 1 sec in the hope it can be 
reused for another task).

Also, it looks like the old ExecutorServices are not shut down when a 
reconfiguration happens.

> RollingFile appender prevents a stand alone application to terminate for as 
> long as 60 sec
> --
>
> Key: LOG4J2-1748
> URL: https://issues.apache.org/jira/browse/LOG4J2-1748
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.7
> Environment: Java8, Windows
>Reporter: Daniele Demichelis
>Assignee: Remko Popma
>  Labels: RollingFile, bug
> Fix For: 2.8
>
>
> This code reproduces what I think is a bug of Log4j2.
> It's a simple loop that logs 2000 messages with two appenders:
> a console appender and a rolling file appender that rolls the file
> every 5Kb. This limit is intentionally low to reproduce what I think is a bug.
> Here's the code.
> {code:java}
> package bug;
> 
> import org.apache.logging.log4j.LogManager;
> import org.apache.logging.log4j.Logger;
> 
> public class Example {
> 
> private static final Logger logger = 
> LogManager.getLogger(Example.class);
> 
> public static void main(String[] args) throws InterruptedException {
> for(int i = 0; i<2000; i++){
> logger.info("This is log message #{}.", i);
> Thread.sleep(0);
> }
> }
> 
> }
> {code}
> Here's the `log4j2.xml` configuration file.
> {code:xml}
> 
> 
> 
> 
> 
> 
>   fileName="target/log4j2/roll-by-size/app.log"
>  
> filePattern="target/log4j2/roll-by-size/app.%i.log.gz"
>  ignoreExceptions="false"
>  append="false">
> 
> %d{-MM-dd HH:mm:ss} %p %m%n
> 
> 
> 
>  size="5 KB"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> {code}
> What is strange is that when the application is launched you will see this 
> logs in the console.
> {code}
> 2016-12-22 22:12:36 INFO This is log message #1993.
> 2016-12-22 22:12:36 INFO This is log message #1994.
> 2016-12-22 22:12:36 INFO This is log message #1995.
> 2016-12-22 22:12:36 INFO This is log message #1996.
> 2016-12-22 22:12:36 INFO This is log message #1997.
> 2016-12-22 22:12:36 INFO This is log message #1998.
> 2016-12-22 22:12:36 INFO This is log message #1999.
> 2016-12-22 22:13:36,380 pool-1-thread-1 DEBUG Stopping 
> LoggerContext[name=60199c81, 
> org.apache.logging.log4j.core.LoggerContext@4597ec68]
> 2016-12-22 22:13:36,380 pool-1-thread-1 DEBUG Stopping 
> LoggerContext[name=60199c81, 
> org.apache.logging.log4j.core.LoggerContext@4597ec68]...
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=StatusLogger]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=ContextSelector]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 2 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=Loggers,name=bug, 
> org.apache.logging.log4j2:type=60199c81,component=Lo
> ggers,name=]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 2 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=Appenders,name=roll-by-size,
>  org.apache.logging.log4j2:type=60199c81,c
> omponent=Appenders,name=stdout]
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no MBeans 
> found matching 
> 'org.apache.logging.log4j2:type=60199c81,component=AsyncAppenders,name=*'
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no 

Re: Bug in Async Logger?

2017-01-09 Thread Remko Popma
Yes that's a bug. 
Well spotted!

Sent from my iPhone

> On Jan 9, 2017, at 17:50, Mikael Ståldal  wrote:
> 
> Have a look at AsyncLogger.java 328-331. "value" is not used, is that correct?

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-09 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15811123#comment-15811123
 ] 

Mikael Ståldal commented on LOG4J2-1724:


OK. I managed to keep it gc-free with additional fields as long as they do not 
contain any substitution (i.e. not worse than before).

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



Property vs. KeyValuePair

2017-01-09 Thread Mikael Ståldal
What is the difference between classes Property and KeyValuePair?


Bug in Async Logger?

2017-01-09 Thread Mikael Ståldal
Have a look at AsyncLogger.java 328-331. "value" is not used, is that
correct?


[jira] [Commented] (LOG4J2-1748) RollingFile appender prevents a stand alone application to terminate for as long as 60 sec

2017-01-09 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15811075#comment-15811075
 ] 

Mikael Ståldal commented on LOG4J2-1748:


Anyway, we could change "shutdownTimeout" to a system property since it is new 
after the 2.7 release.

I put it as a configuration attribute since it is related to "shutdownHook" 
which is already there.

> RollingFile appender prevents a stand alone application to terminate for as 
> long as 60 sec
> --
>
> Key: LOG4J2-1748
> URL: https://issues.apache.org/jira/browse/LOG4J2-1748
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.7
> Environment: Java8, Windows
>Reporter: Daniele Demichelis
>Assignee: Remko Popma
>  Labels: RollingFile, bug
> Fix For: 2.8
>
>
> This code reproduces what I think is a bug of Log4j2.
> It's a simple loop that logs 2000 messages with two appenders:
> a console appender and a rolling file appender that rolls the file
> every 5Kb. This limit is intentionally low to reproduce what I think is a bug.
> Here's the code.
> {code:java}
> package bug;
> 
> import org.apache.logging.log4j.LogManager;
> import org.apache.logging.log4j.Logger;
> 
> public class Example {
> 
> private static final Logger logger = 
> LogManager.getLogger(Example.class);
> 
> public static void main(String[] args) throws InterruptedException {
> for(int i = 0; i<2000; i++){
> logger.info("This is log message #{}.", i);
> Thread.sleep(0);
> }
> }
> 
> }
> {code}
> Here's the `log4j2.xml` configuration file.
> {code:xml}
> 
> 
> 
> 
> 
> 
>   fileName="target/log4j2/roll-by-size/app.log"
>  
> filePattern="target/log4j2/roll-by-size/app.%i.log.gz"
>  ignoreExceptions="false"
>  append="false">
> 
> %d{-MM-dd HH:mm:ss} %p %m%n
> 
> 
> 
>  size="5 KB"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> {code}
> What is strange is that when the application is launched you will see this 
> logs in the console.
> {code}
> 2016-12-22 22:12:36 INFO This is log message #1993.
> 2016-12-22 22:12:36 INFO This is log message #1994.
> 2016-12-22 22:12:36 INFO This is log message #1995.
> 2016-12-22 22:12:36 INFO This is log message #1996.
> 2016-12-22 22:12:36 INFO This is log message #1997.
> 2016-12-22 22:12:36 INFO This is log message #1998.
> 2016-12-22 22:12:36 INFO This is log message #1999.
> 2016-12-22 22:13:36,380 pool-1-thread-1 DEBUG Stopping 
> LoggerContext[name=60199c81, 
> org.apache.logging.log4j.core.LoggerContext@4597ec68]
> 2016-12-22 22:13:36,380 pool-1-thread-1 DEBUG Stopping 
> LoggerContext[name=60199c81, 
> org.apache.logging.log4j.core.LoggerContext@4597ec68]...
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=StatusLogger]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=ContextSelector]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 2 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=Loggers,name=bug, 
> org.apache.logging.log4j2:type=60199c81,component=Lo
> ggers,name=]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 2 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=Appenders,name=roll-by-size,
>  org.apache.logging.log4j2:type=60199c81,c
> omponent=Appenders,name=stdout]
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no MBeans 
> found matching 
> 'org.apache.logging.log4j2:type=60199c81,component=AsyncAppenders,name=*'
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no MBeans 
> found matching 
> 'org.apache.logging.log4j2:type=60199c81,component=AsyncLoggerRingBuffer'
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no MBeans 
> found matching 
> 'org.apache.logging.log4j2:type=60199c81,component=Loggers,name=*,subtype=RingBuffer'
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Stopping 
> 

[jira] [Commented] (LOG4J2-1748) RollingFile appender prevents a stand alone application to terminate for as long as 60 sec

2017-01-09 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15811073#comment-15811073
 ] 

Mikael Ståldal commented on LOG4J2-1748:


I don't really understand why we can't use a configuration attribute for this 
since you have a configuration available when reading the system property 
(LoggerContext.setConfiguration). And it seems like the ExecutorService is 
created (and thus the system property read) each time a reconfiguration happens?

BTW, shouldn't the old one be shut down?

> RollingFile appender prevents a stand alone application to terminate for as 
> long as 60 sec
> --
>
> Key: LOG4J2-1748
> URL: https://issues.apache.org/jira/browse/LOG4J2-1748
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.7
> Environment: Java8, Windows
>Reporter: Daniele Demichelis
>Assignee: Remko Popma
>  Labels: RollingFile, bug
> Fix For: 2.8
>
>
> This code reproduces what I think is a bug of Log4j2.
> It's a simple loop that logs 2000 messages with two appenders:
> a console appender and a rolling file appender that rolls the file
> every 5Kb. This limit is intentionally low to reproduce what I think is a bug.
> Here's the code.
> {code:java}
> package bug;
> 
> import org.apache.logging.log4j.LogManager;
> import org.apache.logging.log4j.Logger;
> 
> public class Example {
> 
> private static final Logger logger = 
> LogManager.getLogger(Example.class);
> 
> public static void main(String[] args) throws InterruptedException {
> for(int i = 0; i<2000; i++){
> logger.info("This is log message #{}.", i);
> Thread.sleep(0);
> }
> }
> 
> }
> {code}
> Here's the `log4j2.xml` configuration file.
> {code:xml}
> 
> 
> 
> 
> 
> 
>   fileName="target/log4j2/roll-by-size/app.log"
>  
> filePattern="target/log4j2/roll-by-size/app.%i.log.gz"
>  ignoreExceptions="false"
>  append="false">
> 
> %d{-MM-dd HH:mm:ss} %p %m%n
> 
> 
> 
>  size="5 KB"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> {code}
> What is strange is that when the application is launched you will see this 
> logs in the console.
> {code}
> 2016-12-22 22:12:36 INFO This is log message #1993.
> 2016-12-22 22:12:36 INFO This is log message #1994.
> 2016-12-22 22:12:36 INFO This is log message #1995.
> 2016-12-22 22:12:36 INFO This is log message #1996.
> 2016-12-22 22:12:36 INFO This is log message #1997.
> 2016-12-22 22:12:36 INFO This is log message #1998.
> 2016-12-22 22:12:36 INFO This is log message #1999.
> 2016-12-22 22:13:36,380 pool-1-thread-1 DEBUG Stopping 
> LoggerContext[name=60199c81, 
> org.apache.logging.log4j.core.LoggerContext@4597ec68]
> 2016-12-22 22:13:36,380 pool-1-thread-1 DEBUG Stopping 
> LoggerContext[name=60199c81, 
> org.apache.logging.log4j.core.LoggerContext@4597ec68]...
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=StatusLogger]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 1 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=ContextSelector]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 2 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=Loggers,name=bug, 
> org.apache.logging.log4j2:type=60199c81,component=Lo
> ggers,name=]
> 2016-12-22 22:13:36,381 pool-1-thread-1 TRACE Unregistering 2 MBeans: 
> [org.apache.logging.log4j2:type=60199c81,component=Appenders,name=roll-by-size,
>  org.apache.logging.log4j2:type=60199c81,c
> omponent=Appenders,name=stdout]
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no MBeans 
> found matching 
> 'org.apache.logging.log4j2:type=60199c81,component=AsyncAppenders,name=*'
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no MBeans 
> found matching 
> 'org.apache.logging.log4j2:type=60199c81,component=AsyncLoggerRingBuffer'
> 2016-12-22 22:13:36,382 pool-1-thread-1 TRACE Unregistering but no MBeans 
> found matching 
>