You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "sivan (JIRA)" <ji...@apache.org> on 2014/04/30 07:46:15 UTC

[jira] [Commented] (LOG4J2-615) Why Rolling file appender writes to console also.

    [ https://issues.apache.org/jira/browse/LOG4J2-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13985194#comment-13985194 ] 

sivan commented on LOG4J2-615:
------------------------------

Thanks for both advises. Now its working fine.

> 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.
> {code}
> <?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>
> {code}



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