Issue Type: Bug Bug
Affects Versions: 1.1.1
Assignee: Logback dev list
Components: logback-classic
Created: 30/Jun/14 12:33 PM
Description:

I have configured a RollingFileAppender with a TimeBasedRollingPolicy and a SizeAndTimeBasedFNATP. The logging works, the zip files are created, but .tmp als files with logging information are created in the working directory. These are of the size, i configured. I do not know why they are there and why they were created in the first place.

My log configuration is as follows:

LoggerContext context = (LoggerContext)LoggerFactory.getILoggerFactory();
context.reset();

PatternLayoutEncoder encoder = new PatternLayoutEncoder();
encoder.setPattern("%-5level %-20([%thread]) %-36alias

{36}

- %msg%n");
encoder.setContext(context);
encoder.start();

RollingFileAppender<ILoggingEvent> rfa = new RollingFileAppender<>();
rfa.setFile(".log");
rfa.setEncoder(encoder);

RollingPolicyBase rolling = new TimeBasedRollingPolicy<>();
SizeAndTimeBasedFNATP<ILoggingEvent> sizeandtime = new SizeAndTimeBasedFNATP<>();
sizeandtime.setMaxFileSize("10MB");
sizeandtime.setTimeBasedRollingPolicy((TimeBasedRollingPolicy) rolling);
((TimeBasedRollingPolicy) rolling).setTimeBasedFileNamingAndTriggeringPolicy(sizeandtime);
((TimeBasedRollingPolicy) rolling).setFileNamePattern("%d

{yyyy-MM-dd}

.%i.log.zip");
((TimeBasedRollingPolicy) rolling).setMaxHistory(30));
rolling.setContext(encoder.getContext());rolling.setParent(rfa);
rolling.start();
rfa.setRollingPolicy(rolling);

Environment:

Windows 7

Project: logback
Labels: rollingFileappender TimeBasedRollingPolicy rollingPolicy
Priority: Major Major
Reporter: Gast B
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
logback-dev mailing list
logback-dev@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-dev

Reply via email to