问题描述
java项目,目前采用slf4j+logback记录日志,tomcat运行输出无问题。但将应用部署到was7就无法生存日志文件。求给位大牛不吝赐教<?xmlversion="1.0"encoding="UTF-8"?><configuration><propertyname="LOGBACK_HOME"value="C:/temp/logs/"/><!--toconsole--><appendername="stdout"class="ch.qos.logback.core.ConsoleAppender"><encoder><pattern>%d{yyyy-MM-ddHH:mm:ss}|%thread|%-5level|%logger{80}|%method|%line->%msg%n</pattern></encoder></appender><!--logoutputtofile--><appendername="RollingFile"class="ch.qos.logback.core.rolling.RollingFileAppender"><file>${LOGBACK_HOME}pccc.nl</file><rollingPolicyclass="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"><!--rolloverdaily--><fileNamePattern>${LOGBACK_HOME}log_%d{yyyy-MM-dd}.nl.%i</fileNamePattern><maxHistory>30</maxHistory><timeBasedFileNamingAndTriggeringPolicyclass="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"><!--orwheneverthefilesizereaches10MB--><maxFileSize>1MB</maxFileSize></timeBasedFileNamingAndTriggeringPolicy></rollingPolicy><encoder><pattern>%d{yyyy-MM-ddHH:mm:ss}|%thread|%-5level|%logger{80}|%method|%line->%msg%n</pattern></encoder></appender><!--root--><rootlevel="DEBUG"><appender-refref="stdout"/><appender-refref="RollingFile"/></root></configuration>
解决方案
解决方案二:
应该是权限的问题吧