[jira] [Commented] (LOG4J2-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Mark Celano (JIRA)

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

Mark Celano commented on LOG4J2-886:


  Please add the following test case to the 
org.apache.logging.log4j.core.appender.SocketAppenderTest

  @Test
public void testPropertyAppender() throws Exception {
org.apache.logging.log4j.Logger LOG2 = 
org.apache.logging.log4j.LogManager.getLogger(SocketAppenderTest.class.getName());

// NDC Stack - Nested Diagnostic Context
org.apache.logging.log4j.ThreadContext.push("NDC: " + "Message");

// MDC Stack - Mapped Diagnostic Context
org.apache.logging.log4j.ThreadContext.getContext().put("MDC", "value");

LOG2.fatal("fatal message", new Exception("fatal occurred"));
LogEvent event = list.poll(3, TimeUnit.SECONDS);

assertNotNull(event.getContextStack());
assertEquals("NDC: Message", event.getContextStack().pop());
assertNotNull(event.getThrown());
assertEquals("fatal occured", event.getThrown().getMessage());
assertNotNull(event.getContextMap());
assertEquals("value", event.getContextMap().get("MDC"));
}

log4j2.xml:



  






  

  

  
  

  



>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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] [Comment Edited] (LOG4J2-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Mark Celano (JIRA)

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

Mark Celano edited comment on LOG4J2-886 at 10/27/14 1:47 PM:
--

  Please add the following test case to the 
org.apache.logging.log4j.core.appender.SocketAppenderTest

  @Test
public void testPropertyAppender() throws Exception {
org.apache.logging.log4j.Logger LOG2 = 
org.apache.logging.log4j.LogManager.getLogger(SocketAppenderTest.class.getName());

// NDC Stack - Nested Diagnostic Context
org.apache.logging.log4j.ThreadContext.push("NDC: " + "Message");

// MDC Stack - Mapped Diagnostic Context
org.apache.logging.log4j.ThreadContext.getContext().put("MDC", "value");

LOG2.fatal("fatal message", new Exception("fatal occurred"));
LogEvent event = list.poll(3, TimeUnit.SECONDS);

assertNotNull(event.getContextStack());
assertEquals("NDC: Message", event.getContextStack().pop());
assertNotNull(event.getThrown());
assertEquals("fatal occured", event.getThrown().getMessage());
assertNotNull(event.getContextMap());
assertEquals("value", event.getContextMap().get("MDC"));
}

log4j2.xml:




  






  

  

  
  

  





was (Author: mcelano):
  Please add the following test case to the 
org.apache.logging.log4j.core.appender.SocketAppenderTest

  @Test
public void testPropertyAppender() throws Exception {
org.apache.logging.log4j.Logger LOG2 = 
org.apache.logging.log4j.LogManager.getLogger(SocketAppenderTest.class.getName());

// NDC Stack - Nested Diagnostic Context
org.apache.logging.log4j.ThreadContext.push("NDC: " + "Message");

// MDC Stack - Mapped Diagnostic Context
org.apache.logging.log4j.ThreadContext.getContext().put("MDC", "value");

LOG2.fatal("fatal message", new Exception("fatal occurred"));
LogEvent event = list.poll(3, TimeUnit.SECONDS);

assertNotNull(event.getContextStack());
assertEquals("NDC: Message", event.getContextStack().pop());
assertNotNull(event.getThrown());
assertEquals("fatal occured", event.getThrown().getMessage());
assertNotNull(event.getContextMap());
assertEquals("value", event.getContextMap().get("MDC"));
}

log4j2.xml:



  






  

  

  
  

  



>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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] [Comment Edited] (LOG4J2-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Mark Celano (JIRA)

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

Mark Celano edited comment on LOG4J2-886 at 10/27/14 1:48 PM:
--

  Please add the following test case to the 
org.apache.logging.log4j.core.appender.SocketAppenderTest

  @Test
public void testPropertyAppender() throws Exception {
org.apache.logging.log4j.Logger LOG2 = 
org.apache.logging.log4j.LogManager.getLogger(SocketAppenderTest.class.getName());

// NDC Stack - Nested Diagnostic Context
org.apache.logging.log4j.ThreadContext.push("NDC: " + "Message");

// MDC Stack - Mapped Diagnostic Context
org.apache.logging.log4j.ThreadContext.getContext().put("MDC", "value");

LOG2.fatal("fatal message", new Exception("fatal occurred"));
LogEvent event = list.poll(3, TimeUnit.SECONDS);

assertNotNull(event.getContextStack());
assertEquals("NDC: Message", event.getContextStack().pop());
assertNotNull(event.getThrown());
assertEquals("fatal occured", event.getThrown().getMessage());
assertNotNull(event.getContextMap());
assertEquals("value", event.getContextMap().get("MDC"));
}

log4j2.xml:




  






  

  

  
  

  




was (Author: mcelano):
  Please add the following test case to the 
org.apache.logging.log4j.core.appender.SocketAppenderTest

  @Test
public void testPropertyAppender() throws Exception {
org.apache.logging.log4j.Logger LOG2 = 
org.apache.logging.log4j.LogManager.getLogger(SocketAppenderTest.class.getName());

// NDC Stack - Nested Diagnostic Context
org.apache.logging.log4j.ThreadContext.push("NDC: " + "Message");

// MDC Stack - Mapped Diagnostic Context
org.apache.logging.log4j.ThreadContext.getContext().put("MDC", "value");

LOG2.fatal("fatal message", new Exception("fatal occurred"));
LogEvent event = list.poll(3, TimeUnit.SECONDS);

assertNotNull(event.getContextStack());
assertEquals("NDC: Message", event.getContextStack().pop());
assertNotNull(event.getThrown());
assertEquals("fatal occured", event.getThrown().getMessage());
assertNotNull(event.getContextMap());
assertEquals("value", event.getContextMap().get("MDC"));
}

log4j2.xml:




  






  

  

  
  

  




>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Gary Gregory (JIRA)

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

Gary Gregory commented on LOG4J2-886:
-

What does the test failure look like in _your_ set up?

>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Mark Celano (JIRA)

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

Mark Celano commented on LOG4J2-886:


This line fails as object is null:  assertNotNull(event.getThrown());




>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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] [Comment Edited] (LOG4J2-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Gary Gregory (JIRA)

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

Gary Gregory edited comment on LOG4J2-886 at 10/27/14 2:16 PM:
---

What does the test failure look like in _your_ environment?

BTW, if you want to provide a change, please attach a diff file.  Adding the 
test method you provided does not work because you also provide a config file. 
The test class uses dynamic ports and a programmatic configuration.

Can you reproduce the problem with a patch or at least provide a stack trace or 
better explanation?

Thank you!


was (Author: garydgregory):
What does the test failure look like in _your_ set up?

>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Mark Celano (JIRA)

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

Mark Celano commented on LOG4J2-886:


The object is null thus this assert fails:  assertNotNull(event.getThrown());  
as well as assertEquals("value", event.getContextMap().get("MDC")); as key is 
not present in map.

>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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: Maven dep is not test scope?

2014-10-27 Thread Gary Gregory
We have dep because of:

/log4j-api/src/test/java/org/apache/logging/log4j/osgi/BundleTestInfo.java

Gary

On Fri, Oct 24, 2014 at 11:21 AM, Ralph Goers 
wrote:

> Matt removed the test scope on July 23 with a comment of “Remove unused
> maven properties and scopes”. To be honest, I am not sure why we have a
> dependency on Maven core at all.  Also, it is declared there in the
> dependencyManagement, so it isn’t actually being declared as a dependency
> there.  I don’t see it referenced anywhere else so it will only impact
> transitive dependencies.
>
> Ralph
>
> On Oct 24, 2014, at 5:59 AM, Gary Gregory  wrote:
>
>
> In the parent POM I see:
>
>   
> org.apache.maven
> maven-core
> 3.1.0
>   
>
> The only direct reference I see to Maven is in:
>
> log4j-api/src/test/java/org/apache/logging/log4j/osgi/BundleTestInfo.java
>
> Shouldn't the dep be test?
>
> Gary
> --
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> 
> Java Persistence with Hibernate, Second Edition
> 
> JUnit in Action, Second Edition 
> Spring Batch in Action 
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>
>
>


-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition

JUnit in Action, Second Edition 
Spring Batch in Action 
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory


Re: Maven dep is not test scope?

2014-10-27 Thread Gary Gregory
I think we can drop this thread because the POM for the API module says:


  org.apache.maven
  maven-core
  test


Gary

On Mon, Oct 27, 2014 at 10:19 AM, Gary Gregory 
wrote:

> We have dep because of:
>
> /log4j-api/src/test/java/org/apache/logging/log4j/osgi/BundleTestInfo.java
>
> Gary
>
> On Fri, Oct 24, 2014 at 11:21 AM, Ralph Goers 
> wrote:
>
>> Matt removed the test scope on July 23 with a comment of “Remove unused
>> maven properties and scopes”. To be honest, I am not sure why we have a
>> dependency on Maven core at all.  Also, it is declared there in the
>> dependencyManagement, so it isn’t actually being declared as a dependency
>> there.  I don’t see it referenced anywhere else so it will only impact
>> transitive dependencies.
>>
>> Ralph
>>
>> On Oct 24, 2014, at 5:59 AM, Gary Gregory  wrote:
>>
>>
>> In the parent POM I see:
>>
>>   
>> org.apache.maven
>> maven-core
>> 3.1.0
>>   
>>
>> The only direct reference I see to Maven is in:
>>
>> log4j-api/src/test/java/org/apache/logging/log4j/osgi/BundleTestInfo.java
>>
>> Shouldn't the dep be test?
>>
>> Gary
>> --
>> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
>> 
>> Java Persistence with Hibernate, Second Edition
>> 
>> JUnit in Action, Second Edition 
>> Spring Batch in Action 
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>>
>>
>
>
> --
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> Java Persistence with Hibernate, Second Edition
> 
> JUnit in Action, Second Edition 
> Spring Batch in Action 
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition

JUnit in Action, Second Edition 
Spring Batch in Action 
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory


[jira] [Comment Edited] (LOG4J2-879) Minor documentation issues with the 2.1 release

2014-10-27 Thread Gary Gregory (JIRA)

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

Gary Gregory edited comment on LOG4J2-879 at 10/27/14 2:24 PM:
---

Current status:

Minor issues with the site:

(x) On the Appenders page, the docs for MemoryMappedFileAppender mention "New 
since 2.1-beta." Should just be 2.1... I missed that.
(/) (master) The Layouts page does not mention the new GELF layout.
(x) The left-hand navigation bar for Layouts does not have a link to JSONLayout
(x) Javadoc is in the Java 6 format (I thought we did something to make it use 
the nicer looking Java 8 format?)
(x) The Configuration manual page is wider than normal and displays a 
horizontal scrollbar.
(x) I suspect this is because in the System Properties table the Default Value 
org.apache.logging.log4j.jul.ApiLoggerAdapter cannot be wrapped over multiple 
lines.
(x) On the Build page, the comment in italics below the title has the same 
color as links, but it is not a link. Bit confusing.
(x) (Personal taste perhaps): On the Runtime Dependencies page, the warnings 
against combining log4j-slf4j-impl with log4j-to-slf4j have a very light color 
that makes them a bit hard to read and does not stand out very much. I would 
prefer a color that contrasts more with the white background. Red bold-face 
like on the webapp manual page would work for me.
(x) (Enhancement, not a problem): The convenience of creating custom log levels 
in Log4j2 should be mentioned in the About page and the Manual Introduction 
page as one of the advantages of Log4j 2. (In log4j 1 users had to create a 
subclass.)

Minor issues with the Manual PDF:

(x) The Configuration page has a code example for advertisers that exceeds the 
page width.
(x) The Configuration page's table with System Properties exceeds the page 
width.




was (Author: garydgregory):
Current status:

Minor issues with the site:

(x) On the Appenders page, the docs for MemoryMappedFileAppender mention "New 
since 2.1-beta." Should just be 2.1... I missed that.
(x) The Layouts page does not mention the new GELF layout.
(x) The left-hand navigation bar for Layouts does not have a link to JSONLayout
(x) Javadoc is in the Java 6 format (I thought we did something to make it use 
the nicer looking Java 8 format?)
(x) The Configuration manual page is wider than normal and displays a 
horizontal scrollbar.
(x) I suspect this is because in the System Properties table the Default Value 
org.apache.logging.log4j.jul.ApiLoggerAdapter cannot be wrapped over multiple 
lines.
(x) On the Build page, the comment in italics below the title has the same 
color as links, but it is not a link. Bit confusing.
(x) (Personal taste perhaps): On the Runtime Dependencies page, the warnings 
against combining log4j-slf4j-impl with log4j-to-slf4j have a very light color 
that makes them a bit hard to read and does not stand out very much. I would 
prefer a color that contrasts more with the white background. Red bold-face 
like on the webapp manual page would work for me.
(x) (Enhancement, not a problem): The convenience of creating custom log levels 
in Log4j2 should be mentioned in the About page and the Manual Introduction 
page as one of the advantages of Log4j 2. (In log4j 1 users had to create a 
subclass.)

Minor issues with the Manual PDF:

(x) The Configuration page has a code example for advertisers that exceeds the 
page width.
(x) The Configuration page's table with System Properties exceeds the page 
width.



> Minor documentation issues with the 2.1 release
> ---
>
> Key: LOG4J2-879
> URL: https://issues.apache.org/jira/browse/LOG4J2-879
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Documentation
>Affects Versions: 2.1
>Reporter: Remko Popma
>Priority: Minor
>
> Minor issues with the site:
> * On the Appenders page, the docs for MemoryMappedFileAppender mention "New 
> since 2.1-beta." Should just be 2.1... I missed that.
> * The Layouts page does not mention the new GELF layout.
> * The left-hand navigation bar for Layouts does not have a link to JSONLayout
> * Javadoc is in the Java 6 format (I thought we did something to make it use 
> the nicer looking Java 8 format?)
> * The Configuration manual page is wider than normal and displays a 
> horizontal scrollbar.
>   I suspect this is because in the System Properties table the Default Value 
> org.apache.logging.log4j.jul.ApiLoggerAdapter cannot be wrapped over multiple 
> lines.
> * On the Build page, the comment in italics below the title has the same 
> color as links, but it is not a link. Bit confusing.
> * (Personal taste perhaps): On the Runtime Dependencies page, the warnings 
> against combining log4j-slf4j-impl with log4j-to-slf4j have a very light

[jira] [Comment Edited] (LOG4J2-879) Minor documentation issues with the 2.1 release

2014-10-27 Thread Gary Gregory (JIRA)

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

Gary Gregory edited comment on LOG4J2-879 at 10/27/14 2:26 PM:
---

Current status:

Minor issues with the site:

(/) (master) On the Appenders page, the docs for MemoryMappedFileAppender 
mention "New since 2.1-beta." Should just be 2.1... I missed that.
(/) (master) The Layouts page does not mention the new GELF layout.
(x) The left-hand navigation bar for Layouts does not have a link to JSONLayout
(x) Javadoc is in the Java 6 format (I thought we did something to make it use 
the nicer looking Java 8 format?)
(x) The Configuration manual page is wider than normal and displays a 
horizontal scrollbar.
(x) I suspect this is because in the System Properties table the Default Value 
org.apache.logging.log4j.jul.ApiLoggerAdapter cannot be wrapped over multiple 
lines.
(x) On the Build page, the comment in italics below the title has the same 
color as links, but it is not a link. Bit confusing.
(x) (Personal taste perhaps): On the Runtime Dependencies page, the warnings 
against combining log4j-slf4j-impl with log4j-to-slf4j have a very light color 
that makes them a bit hard to read and does not stand out very much. I would 
prefer a color that contrasts more with the white background. Red bold-face 
like on the webapp manual page would work for me.
(x) (Enhancement, not a problem): The convenience of creating custom log levels 
in Log4j2 should be mentioned in the About page and the Manual Introduction 
page as one of the advantages of Log4j 2. (In log4j 1 users had to create a 
subclass.)

Minor issues with the Manual PDF:

(x) The Configuration page has a code example for advertisers that exceeds the 
page width.
(x) The Configuration page's table with System Properties exceeds the page 
width.




was (Author: garydgregory):
Current status:

Minor issues with the site:

(x) On the Appenders page, the docs for MemoryMappedFileAppender mention "New 
since 2.1-beta." Should just be 2.1... I missed that.
(/) (master) The Layouts page does not mention the new GELF layout.
(x) The left-hand navigation bar for Layouts does not have a link to JSONLayout
(x) Javadoc is in the Java 6 format (I thought we did something to make it use 
the nicer looking Java 8 format?)
(x) The Configuration manual page is wider than normal and displays a 
horizontal scrollbar.
(x) I suspect this is because in the System Properties table the Default Value 
org.apache.logging.log4j.jul.ApiLoggerAdapter cannot be wrapped over multiple 
lines.
(x) On the Build page, the comment in italics below the title has the same 
color as links, but it is not a link. Bit confusing.
(x) (Personal taste perhaps): On the Runtime Dependencies page, the warnings 
against combining log4j-slf4j-impl with log4j-to-slf4j have a very light color 
that makes them a bit hard to read and does not stand out very much. I would 
prefer a color that contrasts more with the white background. Red bold-face 
like on the webapp manual page would work for me.
(x) (Enhancement, not a problem): The convenience of creating custom log levels 
in Log4j2 should be mentioned in the About page and the Manual Introduction 
page as one of the advantages of Log4j 2. (In log4j 1 users had to create a 
subclass.)

Minor issues with the Manual PDF:

(x) The Configuration page has a code example for advertisers that exceeds the 
page width.
(x) The Configuration page's table with System Properties exceeds the page 
width.



> Minor documentation issues with the 2.1 release
> ---
>
> Key: LOG4J2-879
> URL: https://issues.apache.org/jira/browse/LOG4J2-879
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Documentation
>Affects Versions: 2.1
>Reporter: Remko Popma
>Priority: Minor
>
> Minor issues with the site:
> * On the Appenders page, the docs for MemoryMappedFileAppender mention "New 
> since 2.1-beta." Should just be 2.1... I missed that.
> * The Layouts page does not mention the new GELF layout.
> * The left-hand navigation bar for Layouts does not have a link to JSONLayout
> * Javadoc is in the Java 6 format (I thought we did something to make it use 
> the nicer looking Java 8 format?)
> * The Configuration manual page is wider than normal and displays a 
> horizontal scrollbar.
>   I suspect this is because in the System Properties table the Default Value 
> org.apache.logging.log4j.jul.ApiLoggerAdapter cannot be wrapped over multiple 
> lines.
> * On the Build page, the comment in italics below the title has the same 
> color as links, but it is not a link. Bit confusing.
> * (Personal taste perhaps): On the Runtime Dependencies page, the warnings 
> against combining log4j-slf4j-impl with log4j-to-slf4j

[jira] [Commented] (LOG4J2-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Mark Celano (JIRA)

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

Mark Celano commented on LOG4J2-886:


No exception is thrown here.  This issue is that the exception contained within 
the log message is not sent to the socket server, nor is the MDC map.

To run the test case method provided you will need to place the log4j2.xml in 
the class path.

>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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] [Issue Comment Deleted] (LOG4J2-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Mark Celano (JIRA)

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

Mark Celano updated LOG4J2-886:
---
Comment: was deleted

(was: This line fails as object is null:  assertNotNull(event.getThrown());


)

>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Gary Gregory (JIRA)

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

Gary Gregory commented on LOG4J2-886:
-

In your test, this will not work as you expect:

{code:java}
org.apache.logging.log4j.ThreadContext.getContext().put("MDC", "value");
{code}

Please see the Javadoc for ThreadContext.getContext().

Gary

>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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] [Comment Edited] (LOG4J2-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Gary Gregory (JIRA)

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

Gary Gregory edited comment on LOG4J2-886 at 10/27/14 2:47 PM:
---

  Please add the following test case to the 
org.apache.logging.log4j.core.appender.SocketAppenderTest

{code:java}
  @Test
public void testPropertyAppender() throws Exception {
org.apache.logging.log4j.Logger LOG2 = 
org.apache.logging.log4j.LogManager.getLogger(SocketAppenderTest.class.getName());

// NDC Stack - Nested Diagnostic Context
org.apache.logging.log4j.ThreadContext.push("NDC: " + "Message");

// MDC Stack - Mapped Diagnostic Context
org.apache.logging.log4j.ThreadContext.getContext().put("MDC", "value");

LOG2.fatal("fatal message", new Exception("fatal occurred"));
LogEvent event = list.poll(3, TimeUnit.SECONDS);

assertNotNull(event.getContextStack());
assertEquals("NDC: Message", event.getContextStack().pop());
assertNotNull(event.getThrown());
assertEquals("fatal occured", event.getThrown().getMessage());
assertNotNull(event.getContextMap());
assertEquals("value", event.getContextMap().get("MDC"));
}
{code}
log4j2.xml:
{code:xml}



  






  

  

  
  

  


{code}


was (Author: mcelano):
  Please add the following test case to the 
org.apache.logging.log4j.core.appender.SocketAppenderTest

  @Test
public void testPropertyAppender() throws Exception {
org.apache.logging.log4j.Logger LOG2 = 
org.apache.logging.log4j.LogManager.getLogger(SocketAppenderTest.class.getName());

// NDC Stack - Nested Diagnostic Context
org.apache.logging.log4j.ThreadContext.push("NDC: " + "Message");

// MDC Stack - Mapped Diagnostic Context
org.apache.logging.log4j.ThreadContext.getContext().put("MDC", "value");

LOG2.fatal("fatal message", new Exception("fatal occurred"));
LogEvent event = list.poll(3, TimeUnit.SECONDS);

assertNotNull(event.getContextStack());
assertEquals("NDC: Message", event.getContextStack().pop());
assertNotNull(event.getThrown());
assertEquals("fatal occured", event.getThrown().getMessage());
assertNotNull(event.getContextMap());
assertEquals("value", event.getContextMap().get("MDC"));
}

log4j2.xml:




  






  

  

  
  

  



>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Gary Gregory (JIRA)

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

Gary Gregory commented on LOG4J2-886:
-

Also read the Javadocs for 
{{org.apache.logging.log4j.core.impl.ThrowableProxy}}.

IOW, the behavior is expected.

If you want to address the TODO in the Javadoc, feel free to provide a patch ;-)

>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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] [Comment Edited] (LOG4J2-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Mark Celano (JIRA)

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

Mark Celano edited comment on LOG4J2-886 at 10/27/14 5:18 PM:
--

  Please add the following test case to the 
org.apache.logging.log4j.core.appender.SocketAppenderTest

{code:java}
  @Test
public void testPropertyAppender() throws Exception {
org.apache.logging.log4j.Logger LOG2 = 
org.apache.logging.log4j.LogManager.getLogger(SocketAppenderTest.class.getName());

// NDC Stack - Nested Diagnostic Context
org.apache.logging.log4j.ThreadContext.push("NDC: " + "Message");

// MDC Stack - Mapped Diagnostic Context
org.apache.logging.log4j.ThreadContext.put("MDC", "value");

LOG2.fatal("fatal message", new Exception("fatal occurred"));
LogEvent event = list.poll(3, TimeUnit.SECONDS);

assertNotNull(event.getContextStack());
assertEquals("NDC: Message", event.getContextStack().pop());
assertNotNull(event.getThrown());
assertEquals("fatal occured", event.getThrown().getMessage());
assertNotNull(event.getContextMap());
assertEquals("value", event.getContextMap().get("MDC"));
}
{code}
log4j2.xml:
{code:xml}



  






  

  

  
  

  


{code}


was (Author: mcelano):
  Please add the following test case to the 
org.apache.logging.log4j.core.appender.SocketAppenderTest

{code:java}
  @Test
public void testPropertyAppender() throws Exception {
org.apache.logging.log4j.Logger LOG2 = 
org.apache.logging.log4j.LogManager.getLogger(SocketAppenderTest.class.getName());

// NDC Stack - Nested Diagnostic Context
org.apache.logging.log4j.ThreadContext.push("NDC: " + "Message");

// MDC Stack - Mapped Diagnostic Context
org.apache.logging.log4j.ThreadContext.getContext().put("MDC", "value");

LOG2.fatal("fatal message", new Exception("fatal occurred"));
LogEvent event = list.poll(3, TimeUnit.SECONDS);

assertNotNull(event.getContextStack());
assertEquals("NDC: Message", event.getContextStack().pop());
assertNotNull(event.getThrown());
assertEquals("fatal occured", event.getThrown().getMessage());
assertNotNull(event.getContextMap());
assertEquals("value", event.getContextMap().get("MDC"));
}
{code}
log4j2.xml:
{code:xml}



  






  

  

  
  

  


{code}

>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Mark Celano (JIRA)

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

Mark Celano commented on LOG4J2-886:


I have corrected the code snippet above for the test case for the MDC and agree 
this works as expected:
{code:java}
// MDC Stack - Mapped Diagnostic Context
org.apache.logging.log4j.ThreadContext.put("MDC", "value");
{code}

Issue (maybe a TODO in ThrowableProxy) still surrounding the lack of the 
throwable within the LogEvent exist within the SocketAppender.  Can you explain 
why this is the case since in other appenders such as the console appender the 
thowable arrives? 

>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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-886) Not serializing the exception or ThreadContext (MDC)

2014-10-27 Thread Ralph Goers (JIRA)

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

Ralph Goers commented on LOG4J2-886:


The SerializedLayout is a special case since the events are being serialized to 
be sent to a remote system. One would never expect the ConsoleAppender to use 
the SerializedLayout.

There are tools, such as Lillith - http://lilith.huxhorn.de/ - that allow 
events to be sent to a generic log reporting tool.  Since ThrowableProxy is a 
Log4j class it should always be able to be deserialized. But if that tool does 
not have the Class object for the actual exception that was thrown it will not 
be able to deserialize it, but it will still have access to all the information 
about the exception and the event via the getThrownProxy method.

>  Not serializing the exception or ThreadContext (MDC) 
> --
>
> Key: LOG4J2-886
> URL: https://issues.apache.org/jira/browse/LOG4J2-886
> Project: Log4j 2
>  Issue Type: Bug
>  Components: Appenders, Layouts
>Affects Versions: 2.1
>Reporter: Mark Celano
>
> Not serializing the exception or ThreadContext (MDC) into the serialized 
> LogEvent object when using the SerializedLayout for the Socket appender.



--
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-799) Log4j 2 throws ArrayIndexOutOfBoundsException

2014-10-27 Thread JIRA

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

Gökalp Kuşçu updated LOG4J2-799:

Attachment: result.zip
log4j2-799.xml
Log4j2_799Test.java

there is no problem.

> Log4j 2 throws ArrayIndexOutOfBoundsException
> -
>
> Key: LOG4J2-799
> URL: https://issues.apache.org/jira/browse/LOG4J2-799
> Project: Log4j 2
>  Issue Type: Bug
>Affects Versions: 2.0-rc1, 2.0-rc2, 2.0.2
>Reporter: Nikita Koval
>Priority: Critical
> Attachments: Log4j-799.diff, Log4j2_799Test.java, log4j2-799.xml, 
> result.zip
>
>
> Sometimes, logging throws java.lang.ArrayIndexOutOfBoundsException: 
> {noformat}
> 2014-05-23 01:01:37,019 ERROR An exception occurred processing Appender Err 
> java.lang.ArrayIndexOutOfBoundsException: 6
> at 
> org.apache.logging.log4j.core.impl.ThrowableProxy.formatElements(ThrowableProxy.java:269)
> at 
> org.apache.logging.log4j.core.impl.ThrowableProxy.getExtendedStackTrace(ThrowableProxy.java:232)
> at 
> org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter.format(ExtendedThrowablePatternConverter.java:72)
> at 
> org.apache.logging.log4j.core.pattern.PatternFormatter.format(PatternFormatter.java:36)
> at 
> org.apache.logging.log4j.core.layout.PatternLayout.toSerializable(PatternLayout.java:172)
> at 
> org.apache.logging.log4j.core.layout.PatternLayout.toSerializable(PatternLayout.java:52)
> at 
> org.apache.logging.log4j.core.layout.AbstractStringLayout.toByteArray(AbstractStringLayout.java:45)
> at 
> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:118)
> at 
> org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:85)
> at 
> org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:97)
> at 
> org.apache.logging.log4j.core.appender.AsyncAppender$AsyncThread.callAppenders(AsyncAppender.java:276)
> at 
> org.apache.logging.log4j.core.appender.AsyncAppender$AsyncThread.run(AsyncAppender.java:239)
> {noformat}
> Here is configuration:
> {code}
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  filePattern="${GFT_VAR}/log/${target}.log.%i">
> 
> 
> 
> 
> 
> 
>  filePattern="${GFT_VAR}/log/${target}.err.%i">
> 
> 
> 
> 
> 
> 
> 
>   filePattern="${GFT_VAR}/log/${target}.stat.%i">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  level="info">
> 
> 
> 
> 
> 
> 
> 
> {code}



--
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] [Created] (LOG4J2-887) There is a memory leak and Eclipse Memory analysis has flagged the instance “com.sleepycat.je.tx.SyncedLockManager

2014-10-27 Thread Avinash Dhananjay (JIRA)
Avinash Dhananjay created LOG4J2-887:


 Summary: There is a  memory leak and Eclipse Memory analysis has 
flagged the instance “com.sleepycat.je.tx.SyncedLockManager
 Key: LOG4J2-887
 URL: https://issues.apache.org/jira/browse/LOG4J2-887
 Project: Log4j 2
  Issue Type: Bug
  Components: Flume Appender
Affects Versions: 2.0-rc1
 Environment: PRODUCTION, Red Hat Linux 5
Reporter: Avinash Dhananjay
Priority: Blocker
 Fix For: 2.1


There is a  memory leak and Eclipse Memory analysis has flagged the instance 
“com.sleepycat.je.tx.SyncedLockManager.
Also, there are 308 ERRORs in thelog file, ERROR Caused by 
java.util.concurrent.RejectedExecutionException: null.  Is one of the thread 
pools being exhausted?

One instance of "com.sleepycat.je.txn.SyncedLockManager" loaded 
by"org.jboss.classloader.spi.base.BaseClassLoader @ 0x732e868e8" 
occupies33,555,808 (12.79%) bytes. The memory is accumulated in one instance 
of"java.util.HashMap$Entry[]" loaded by "".



--
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