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/26 12:27:14 UTC

[jira] [Resolved] (LOG4J2-610) Rolling file appender

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

sivan resolved LOG4J2-610.
--------------------------

    Resolution: Not a Problem

This is due to the permission Modify was not set to the folder. Now its resolved.

> Rolling file appender
> ---------------------
>
>                 Key: LOG4J2-610
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-610
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-rc1
>         Environment: Java
>            Reporter: sivan
>
> For rolling file appender in Log4j2, rollback is happening but the new file still contains the entire old contents and is not clears the old contents already rollbacked. This is happening in our UAT. The requirement is to rollback on daily basis and the new file contents should be of the current date logs only.
> My configuration is as follows. Can you please help me to resolve this issue.
> <?xml version="1.0" encoding="UTF-8"?>
> <configuration>
> 	<properties>
> 		<property name="patternUMP">log_type_%c|%K{sessionId}|%t|%d{MM/dd/yyyy HH:mm:ss.SSS}|%p|%C|%M|%L|%K{msg}%n</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>
> 		<Console name="Console" target="SYSTEM_OUT">
> 			<PatternLayout pattern="${patternUMP}"/>
> 		</Console>
> 		<RollingFile name="rfaUMP" 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="rfaUMP"/>
>     	</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>
> 		<Logger name="Console" level="info">
>             <AppenderRef ref="Console"/>
>         </Logger>
> 		<root level="debug">
> 			<AppenderRef ref="Console"/>
> 		</root>
> 	</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