logback输出的日志文件,默认会放到“启动进程”的目录下面
比如说程序直接在eclipse里跑,就会输出到eclipse.exe所在的目录下,如果是在tomcat中跑,就会输出到%TOMCAT_HOME%/bin目录下
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>MyLog/logFile.%d{yyyy-MM-dd}.log</fileNamePattern> <maxHistory>30</maxHistory> </rollingPolicy> <encoder> <pattern>%-4relative %d{HH:mm:ss.SSS} - [%thread] %-5level %class - %msg%n</pattern> </encoder> </appender>
后面的自己去原帖看吧……………………