logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Sicker (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LOG4J2-615) Why Rolling file appender writes to console also.
Date Sat, 26 Apr 2014 22:38:14 GMT

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

Matt Sicker resolved LOG4J2-615.
--------------------------------

    Resolution: Invalid

That's the expected behaviour. Check out [the manual about additivity|http://logging.apache.org/log4j/2.x/manual/configuration.html#Additivity]
for details on disabling that. Basically, you want to add {{additivity="false"}} to each of
your {{AsyncLogger}} tags to disable that.

> Why Rolling file appender writes to console also.
> -------------------------------------------------
>
>                 Key: LOG4J2-615
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-615
>             Project: Log4j 2
>          Issue Type: Bug
>         Environment: Java 7
>            Reporter: sivan
>            Priority: Critical
>
> Rolling file appender writes to console also. java 7 is used. The configuration is as
below.
> <?xml version="1.0" encoding="UTF-8"?>
> <configuration>
> 	<properties>
> 		<property name="patternUMP">${sys:logPattern}</property>
> 		<property name="filePattern">${sys:logfilepath}//$${date:yyyy-MM}//${sys:oft.appserver}-out-%d{yyyy-MM-dd}.log</property>
> 		<property name="fileName">${sys:logfilepath}//${sys:oft.appserver}-out.log</property>
> 	</properties>
> 	<appenders>
> 		<RollingFile name="RollingFile" fileName="${fileName}" filePattern="${filePattern}">
> 			<PatternLayout>
> 				<pattern>${patternUMP}</pattern>
> 			</PatternLayout>
> 			<Policies>
> 				<TimeBasedTriggeringPolicy />
> 				<SizeBasedTriggeringPolicy />
> 			</Policies>
> 			<DefaultRolloverStrategy compressionLevel="0" max="3"/>
> 		</RollingFile>	
> 		<Async name="AsyncAppender" includeLocation="true">
>       		<AppenderRef ref="RollingFile"/>
>     	</Async>	
> 	</appenders>
> 	<loggers>					
> 		<AsyncLogger name="sso" level="info" includeLocation="true">
> 			<AppenderRef ref="AsyncAppender"/>
> 		</AsyncLogger>
> 		<AsyncLogger name="webservice" level="info" includeLocation="true">
> 			<AppenderRef ref="AsyncAppender"/>
> 		</AsyncLogger>
> 	</loggers>
> </configuration>



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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