logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kent Yeh (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-436) RollingRandomAccessFile pattern layout not work for mathod and line no
Date Thu, 24 Oct 2013 05:08:42 GMT

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

Kent Yeh updated LOG4J2-436:
----------------------------

    Description: 
my log4j2.xml %M(%L) not work
{code:xml}<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" name="keyproduct" verbose="false" monitorInterval="30">
        <Appenders>
                <Console name="console">
                        <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %highlight{%-5level}
%class{1.}.%M(%L) - %highlight{%msg}%n%ex{full}%n" />
                </Console>
                <RollingRandomAccessFile name="keyproduct-FastRollingFile" fileName="${sys:jboss.server.home.dir}/log/keyproduct.log"
                        filePattern="${sys:jboss.server.home.dir}/log/keyproduct-%d{MM-dd-yyyy}-%i.log.gz">
                        <PatternLayout>
                                <pattern>%d{HH:mm:ss.SSS} [%t] %-5level %c{1.} %M(%L)
- %msg%n%ex{full}%n</pattern>
                        </PatternLayout>
                        <Policies>
                                <TimeBasedTriggeringPolicy />
                                <SizeBasedTriggeringPolicy size="250 MB" />
                        </Policies>
                </RollingRandomAccessFile>
        </Appenders>
        <Loggers>
                <Logger name="package.of.keyproduct" level="INFO" additivity="false">
                        <appender-ref ref="console" />
                        <appender-ref ref="keyproduct-FastRollingFile" />
                </Logger>
                <Root level="info">
                        <appender-ref ref="console" />
                        <appender-ref ref="keyproduct-FastRollingFile" />
                </Root>
        </Loggers>
</Configuration>
{code}
and output is{code}
07:01:13.118 [main] INFO  t.s.Worker () - output message {code}

  was:
my log4j2.xml %M(%L) not work
{code:xml}<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn" name="keyproduct" verbose="false" monitorInterval="30">
        <Appenders>
                <Console name="console">
                        <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %highlight{%-5level}
%class{1.}.%M(%L) - %highlight{%msg}%n%ex{full}%n" />
                </Console>
                <RollingRandomAccessFile name="keyproduct-FastRollingFile" fileName="${sys:jboss.server.home.dir}/log/keyproduct.log"
                        filePattern="${sys:jboss.server.home.dir}/log/keyproduct-%d{MM-dd-yyyy}-%i.log.gz">
                        <PatternLayout>
                                <pattern>%d %p %C{1.} [%t] %m%n%ex{full}%n</pattern>
                        </PatternLayout>
                        <Policies>
                                <TimeBasedTriggeringPolicy />
                                <SizeBasedTriggeringPolicy size="250 MB" />
                        </Policies>
                </RollingRandomAccessFile>
        </Appenders>
        <Loggers>
                <Logger name="package.of.keyproduct" level="INFO" additivity="false">
                        <appender-ref ref="console" />
                        <appender-ref ref="keyproduct-FastRollingFile" />
                </Logger>
                <Root level="info">
                        <appender-ref ref="console" />
                        <appender-ref ref="keyproduct-FastRollingFile" />
                </Root>
        </Loggers>
</Configuration>
{code}
and output is{code}
07:01:13.118 [main] INFO  t.s.Worker () - output message {code}


> RollingRandomAccessFile pattern layout not work for mathod and line no
> ----------------------------------------------------------------------
>
>                 Key: LOG4J2-436
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-436
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-beta9
>            Reporter: Kent Yeh
>            Priority: Minor
>
> my log4j2.xml %M(%L) not work
> {code:xml}<?xml version="1.0" encoding="UTF-8"?>
> <Configuration status="warn" name="keyproduct" verbose="false" monitorInterval="30">
>         <Appenders>
>                 <Console name="console">
>                         <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %highlight{%-5level}
%class{1.}.%M(%L) - %highlight{%msg}%n%ex{full}%n" />
>                 </Console>
>                 <RollingRandomAccessFile name="keyproduct-FastRollingFile" fileName="${sys:jboss.server.home.dir}/log/keyproduct.log"
>                         filePattern="${sys:jboss.server.home.dir}/log/keyproduct-%d{MM-dd-yyyy}-%i.log.gz">
>                         <PatternLayout>
>                                 <pattern>%d{HH:mm:ss.SSS} [%t] %-5level %c{1.}
%M(%L) - %msg%n%ex{full}%n</pattern>
>                         </PatternLayout>
>                         <Policies>
>                                 <TimeBasedTriggeringPolicy />
>                                 <SizeBasedTriggeringPolicy size="250 MB" />
>                         </Policies>
>                 </RollingRandomAccessFile>
>         </Appenders>
>         <Loggers>
>                 <Logger name="package.of.keyproduct" level="INFO" additivity="false">
>                         <appender-ref ref="console" />
>                         <appender-ref ref="keyproduct-FastRollingFile" />
>                 </Logger>
>                 <Root level="info">
>                         <appender-ref ref="console" />
>                         <appender-ref ref="keyproduct-FastRollingFile" />
>                 </Root>
>         </Loggers>
> </Configuration>
> {code}
> and output is{code}
> 07:01:13.118 [main] INFO  t.s.Worker () - output message {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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