Issue Type: Bug Bug
Affects Versions: 1.0.13
Assignee: Logback dev list
Components: logback-core
Created: 13/Jul/13 2:08 AM
Description:

If setTimeBasedRollingPolicy has not been set on a SizeAndTimeBasedFNATP class a java.lang.NullPointerException is thrown rather than a cleaner reporting of the issue.

Exception in thread "main" java.lang.NullPointerException
at ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicyBase.start(TimeBasedFileNamingAndTriggeringPolicyBase.java:44)
at ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP.start(SizeAndTimeBasedFNATP.java:37)

The reason for this seems that within TimeBasedFileNamingAndTriggeringPolicyBase.start

The following line is executed without first checking that tbrp has been setup first.

public void start() {
DateTokenConverter dtc = tbrp.fileNamePattern.getPrimaryDateTokenConverter();
.....

Environment:

Windows 7 development environment

Project: logback
Priority: Minor Minor
Reporter: Roger Thomas
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