Ilya Tepikin created LOG4J2-503:
-----------------------------------
Summary: Received email (via SMTP Appender) doesn't contain error
code line number
Key: LOG4J2-503
URL: https://issues.apache.org/jira/browse/LOG4J2-503
Project: Log4j 2
Issue Type: Bug
Components: Appenders, Layouts
Affects Versions: 2.0-beta9
Reporter: Ilya Tepikin
logj42.xml config:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" name="Server" packages="">
<!-- Mail server configuration -->
<properties>
<property name="from">[email protected]</property>
<property name="receipients">[email protected]</property>
<property name="smtpHost">email.host.com</property>
<property name="smtpPort">25</property>
<property name="smtpProtocol">smtp</property>
<property name="smtpUser">user</property>
<property name="smtpPassword">password</property>
<property name="subject">Error log</property>
</properties>
<Appenders>
<RollingRandomAccessFile name="RollingRandomAccessFile"
fileName="/log.log"
filePattern="/log-%d{yyyy-MM-dd-HH.mm.ss}.log.zip"
immediateFlush="false"
append="false">
<PatternLayout>
<Pattern>%-5p %d{yyyy-MM-dd HH:mm:ss,SSS} [%X{sid}] %-30c{1}
%-30M %4L %m%n</Pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="1" compressionLevel="5"/>
</RollingRandomAccessFile>
<SMTP name="Mailer" suppressExceptions="false"
subject="${subject}" to="${receipients}" from="${from}"
smtpHost="${smtpHost}" smtpPort="${smtpPort}"
smtpProtocol="${smtpProtocol}" smtpUsername="${smtpUser}"
smtpPassword="${smtpPassword}" smtpDebug="false" bufferSize="5">
<HTMLLayout locationInfo="true" fontSize="small" />
</SMTP>
<Async name="AsyncMailer">
<AppenderRef ref="Mailer"/>
</Async>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="RollingRandomAccessFile" level="info"/>
<AppenderRef ref="AsyncMailer"/>
</Root>
</Loggers>
</Configuration>
{code}
Email I received after error occurs:
{code}
15-01-2014 21:03:03,754 INFO [http-bio-8080-exec-32:sid=1,
esid=Ivan.Ivanov]UserFilter.: - Request header param: accept-encoding value:
gzip,deflate,sdch
15-01-2014 21:03:03,754 INFO [http-bio-8080-exec-32:sid=1,
esid=Ivan.Ivanov]UserFilter.: - Request header param: accept-language value:
ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
15-01-2014 21:03:03,754 INFO [http-bio-8080-exec-32:sid=1,
esid=Ivan.Ivanov]UserFilter.: - Request header param: cookie value:
JSESSIONID=3F3A14F0A78BBE02AA4A7C0F06CFCDF;
15-01-2014 21:03:03,755 INFO [http-bio-8080-exec-32:sid=1,
esid=Ivan.Ivanov]AdminUserManager.: - Getting user with username Ivan.Ivanov
15-01-2014 21:03:03,767 ERROR [http-bio-8080-exec-32:sid=1,
esid=Ivan.Ivanov]CommonController.: - Uncaught exception in controller!
{code}
As you can notice there is no code line number where error occured. There are
just
{code}
<ClassName>.: - <Message>
{code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]