logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sivan (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LOG4J2-610) Rolling file appender
Date Sat, 26 Apr 2014 10:27:14 GMT

     [ 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


Mime
View raw message