Discussion:
[jira] [Created] (LOG4J2-835) Possibility to turn off logging of lib name and version in exception stack trace
Anton Korenkov (JIRA)
2014-09-17 12:05:33 UTC
Permalink
Anton Korenkov created LOG4J2-835:
-------------------------------------

Summary: Possibility to turn off logging of lib name and version in exception stack trace
Key: LOG4J2-835
URL: https://issues.apache.org/jira/browse/LOG4J2-835
Project: Log4j 2
Issue Type: Improvement
Components: Core
Affects Versions: 2.0.2
Reporter: Anton Korenkov
Priority: Minor


New feature in log4j-2 is library name and version appending while logging stack trace. Sometimes it's helpful, but in some cases it will be good to turn off this feature by setting new property (e.g. "appned-lib") to false for example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Remko Popma (JIRA)
2014-09-17 12:50:34 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137165#comment-14137165 ]

Remko Popma commented on LOG4J2-835:
------------------------------------

I don't think log4j2 supports logging the library name/version, unless I'm missing something...
There are a number of location [options in the pattern layout|http://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout] but you need to switch them _on_, by default they are not displayed. Because there is an _on_ switch (in configuration) there is no need for an off switch...
Post by Anton Korenkov (JIRA)
Possibility to turn off logging of lib name and version in exception stack trace
--------------------------------------------------------------------------------
Key: LOG4J2-835
URL: https://issues.apache.org/jira/browse/LOG4J2-835
Project: Log4j 2
Issue Type: Improvement
Components: Core
Affects Versions: 2.0.2
Reporter: Anton Korenkov
Priority: Minor
New feature in log4j-2 is library name and version appending while logging stack trace. Sometimes it's helpful, but in some cases it will be good to turn off this feature by setting new property (e.g. "appned-lib") to false for example.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Anton Korenkov (JIRA)
2014-09-17 13:58:37 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137272#comment-14137272 ]

Anton Korenkov commented on LOG4J2-835:
---------------------------------------

I'll try explain on next example. I have next pattern:
{noformat}
pattern="[%d] [%t] %-5p %c %x - %m%n"
{noformat}

Wigh log4j 1.2.17 I'll see next stack trace in case of exception:
{noformat}
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
{noformat}

But with logj4 2.0.2:
{noformat}
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_17]
at java.lang.Thread.run(Thread.java:722) [?:1.7.0_17]
{noformat}

As you may see there is one difference at the end of the line: [?:1.7.0_17] That what I meant by lib name and version.
Post by Anton Korenkov (JIRA)
Possibility to turn off logging of lib name and version in exception stack trace
--------------------------------------------------------------------------------
Key: LOG4J2-835
URL: https://issues.apache.org/jira/browse/LOG4J2-835
Project: Log4j 2
Issue Type: Improvement
Components: Core
Affects Versions: 2.0.2
Reporter: Anton Korenkov
Priority: Minor
New feature in log4j-2 is library name and version appending while logging stack trace. Sometimes it's helpful, but in some cases it will be good to turn off this feature by setting new property (e.g. "appned-lib") to false for example.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Ralph Goers (JIRA)
2014-09-17 15:30:35 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137390#comment-14137390 ]

Ralph Goers commented on LOG4J2-835:
------------------------------------

If you do not include one of the exception converter formats in the pattern the pattern layout acts as if %xEx was specified. Simply change your pattern to end with %ex instead.
Post by Anton Korenkov (JIRA)
Possibility to turn off logging of lib name and version in exception stack trace
--------------------------------------------------------------------------------
Key: LOG4J2-835
URL: https://issues.apache.org/jira/browse/LOG4J2-835
Project: Log4j 2
Issue Type: Improvement
Components: Core
Affects Versions: 2.0.2
Reporter: Anton Korenkov
Priority: Minor
New feature in log4j-2 is library name and version appending while logging stack trace. Sometimes it's helpful, but in some cases it will be good to turn off this feature by setting new property (e.g. "appned-lib") to false for example.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Ralph Goers (JIRA)
2014-09-17 15:31:33 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137390#comment-14137390 ]

Ralph Goers edited comment on LOG4J2-835 at 9/17/14 3:31 PM:
-------------------------------------------------------------

If you do not include one of the exception converter formats in the pattern the pattern layout acts as if %xEx was specified. Simply change your pattern to end with %ex instead. This behavior is documented at http://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout.


was (Author: ***@dslextreme.com):
If you do not include one of the exception converter formats in the pattern the pattern layout acts as if %xEx was specified. Simply change your pattern to end with %ex instead.
Post by Anton Korenkov (JIRA)
Possibility to turn off logging of lib name and version in exception stack trace
--------------------------------------------------------------------------------
Key: LOG4J2-835
URL: https://issues.apache.org/jira/browse/LOG4J2-835
Project: Log4j 2
Issue Type: Improvement
Components: Core
Affects Versions: 2.0.2
Reporter: Anton Korenkov
Priority: Minor
New feature in log4j-2 is library name and version appending while logging stack trace. Sometimes it's helpful, but in some cases it will be good to turn off this feature by setting new property (e.g. "appned-lib") to false for example.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Anton Korenkov (JIRA)
2014-09-18 07:56:34 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14138663#comment-14138663 ]

Anton Korenkov commented on LOG4J2-835:
---------------------------------------

Thanks a lot! I was confused that in log4j 1.2.17 it worked without any additional patterns for exceptions. I think can be closed.
Post by Anton Korenkov (JIRA)
Possibility to turn off logging of lib name and version in exception stack trace
--------------------------------------------------------------------------------
Key: LOG4J2-835
URL: https://issues.apache.org/jira/browse/LOG4J2-835
Project: Log4j 2
Issue Type: Improvement
Components: Core
Affects Versions: 2.0.2
Reporter: Anton Korenkov
Priority: Minor
New feature in log4j-2 is library name and version appending while logging stack trace. Sometimes it's helpful, but in some cases it will be good to turn off this feature by setting new property (e.g. "appned-lib") to false for example.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Anton Korenkov (JIRA)
2014-09-18 07:57:33 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anton Korenkov closed LOG4J2-835.
---------------------------------
Resolution: Not a Problem
Post by Anton Korenkov (JIRA)
Possibility to turn off logging of lib name and version in exception stack trace
--------------------------------------------------------------------------------
Key: LOG4J2-835
URL: https://issues.apache.org/jira/browse/LOG4J2-835
Project: Log4j 2
Issue Type: Improvement
Components: Core
Affects Versions: 2.0.2
Reporter: Anton Korenkov
Priority: Minor
New feature in log4j-2 is library name and version appending while logging stack trace. Sometimes it's helpful, but in some cases it will be good to turn off this feature by setting new property (e.g. "appned-lib") to false for example.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Loading...