logback rolling file is misplaced -
i have application deployed on openshift. have below configuration on log back.xml.
<appender name="file" class="ch.qos.logback.core.rolling.rollingfileappender"> <prudent>true</prudent> <rollingpolicy class="ch.qos.logback.core.rolling.timebasedrollingpolicy"> <filenamepattern>${logpath}mylogfile.%d{yyyy-mm-dd}.log</filenamepattern> <maxhistory>5</maxhistory> </rollingpolicy> <encoder> <pattern>%d{iso8601} %p %t %c{1}.%m - %m%n</pattern> </encoder>
i can read on server $logpath properly substituted , logback file has no problems in terms of setting properties. doesn't write log file @ specified place. tried specifying file property , setting prudent "false" well, still no luck. checked permissions on file scheme there no problems, creating , writing file @ specified location. i'm using log 1.1.2.
note: checked question , it's answer. setup logback rollingfileappender prudent flag , file location
does have thought wrong here? hope there isn't bug timebasedrollingpolicy
updating ticket clarify variable substitution (per logback documentation http://logback.qos.ch/manual/configuration.html#variablesubstitution ) ${logpath} variable substituted during build time (in jenkins) , war file generated bears right path log file. war file deployed tomcat.
logback
No comments:
Post a Comment