Thank you for your reply, but I have tried it and it doesn't work. I get the following NPE:
18:09:34,093 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [LOGFILE]
18:09:34,109 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@44:139 - RuntimeException in Action for tag [timeBasedFileNamingAndTriggeringPolicy] java.lang.NullPointerException
at java.lang.NullPointerException
at at ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicyBase.start(TimeBasedFileNamingAndTriggeringPolicyBase.java:44)
at at ch.qos.logback.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy.start(DefaultTimeBasedFileNamingAndTriggeringPolicy.java:32)
at at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.end(NestedComplexPropertyIA.java:167) (and much more...)
This happens before any of the overriden methods in my subclass are called.
The relevant section of my config file is:
<appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>&ProgLogDir;/&CompID;.${FullTimeStamp}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>&ProgLogDir;/&CompID;.%d{yyMMdd.HHmmss}.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="com.camerontec.cameronfix.emx.util.logger.TimeStampedFileNamingAndTriggeringPolicy"/>
</rollingPolicy>
<encoder>
<pattern>[%d{HH:mm:ss.SSS}] %-5level {%thread} %logger{2}: %msg%n</pattern>
</encoder>
</appender>
I have altered this section of config in many ways, but always I get this same NPE in the start() method.
Please can you tell me what I need to do to stop this from happening. Thank you.
18:09:34,093 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [LOGFILE]
18:09:34,109 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@44:139 - RuntimeException in Action for tag [timeBasedFileNamingAndTriggeringPolicy] java.lang.NullPointerException
at java.lang.NullPointerException
at at ch.qos.logback.core.rolling.TimeBasedFileNamingAndTriggeringPolicyBase.start(TimeBasedFileNamingAndTriggeringPolicyBase.java:44)
at at ch.qos.logback.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy.start(DefaultTimeBasedFileNamingAndTriggeringPolicy.java:32)
at at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.end(NestedComplexPropertyIA.java:167) (and much more...)
This happens before any of the overriden methods in my subclass are called.
The relevant section of my config file is:
<appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>&ProgLogDir;/&CompID;.${FullTimeStamp}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>&ProgLogDir;/&CompID;.%d{yyMMdd.HHmmss}.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="com.camerontec.cameronfix.emx.util.logger.TimeStampedFileNamingAndTriggeringPolicy"/>
</rollingPolicy>
<encoder>
<pattern>[%d{HH:mm:ss.SSS}] %-5level {%thread} %logger{2}: %msg%n</pattern>
</encoder>
</appender>
I have altered this section of config in many ways, but always I get this same NPE in the start() method.
Please can you tell me what I need to do to stop this from happening. Thank you.