logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LOG4J2-503) Received email (via SMTP Appender) doesn't contain error code line number
Date Thu, 16 Jan 2014 13:03:19 GMT

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

Remko Popma resolved LOG4J2-503.
--------------------------------

    Resolution: Not A Problem

For Async appender, you need to specify {{includeLocation="true"}} if you want the output
to show location-based info like line numbers.

http://logging.apache.org/log4j/2.0/manual/appenders.html#AsyncAppender

Please close if this resolves the issue, re-open otherwise.


> 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">mail@from.com</property>
>         <property name="receipients">mail@to.com</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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message