logback-spring.xml文件有注解说明
<?xml version="1.0" encoding="UTF-8"?> <configuration> <property name="defPath" value="logs/"/> <property name="defPattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] %5p [%c:%L] - %m%n"/> <property name="defRollingSize" value="100MB"/> <property name="defRollingMax" value="3"/> <logger name="com.gs" level="debug"/> <logger name="org.springframework.web" level="info"/> <logger name="org.ibatis" level="DEBUG"/> <logger name="druid.sql" level="DEBUG"/> <logger name="org.springframework.jdbc" level="WARN"/> <logger name="springfox.documentation" level="WARN"/> <logger name="com.netflix.discovery" level="WARN"/> <logger name="org.springframework.context" level="WARN"/> <logger name="org.springframework.core" level="WARN"/> <logger name="org.springframework.data" level="WARN"/> <!-- 控制台打印 --> <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${defPattern}</pattern> </encoder> </appender> <!-- 记录系统核心运行环节的日志,包括错误信息 --> <appender name="dmsLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${defPath}/logs.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <fileNamePattern>${defPath}/logs-%i.log.gz</fileNamePattern> <minIndex>1</minIndex> <maxIndex>${defRollingMax}</maxIndex> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>${defRollingSize}</maxFileSize> </triggeringPolicy> <encoder> <pattern>${defPattern}</pattern> </encoder> </appender> <!-- 仅仅额外记录系统各个环节的错误信息 --> <appender name="dmsErrorLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${defPath}/error.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <fileNamePattern>${defPath}/error-%i.log.gz</fileNamePattern> <minIndex>1</minIndex> <maxIndex>${defRollingMax}</maxIndex> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>${defRollingSize}</maxFileSize> </triggeringPolicy> <encoder> <pattern>${defPattern}</pattern> </encoder> </appender> <!-- 仅仅记录系统启动环节的日志 --> <appender name="dmsStartLog" class="ch.qos.logback.core.FileAppender"> <file>${defPath}/start.log</file> <encoder> <pattern>${defPattern}</pattern> </encoder> </appender> <!-- 仅仅记录系统停止环节的日志 --> <appender name="dmsStopLog" class="ch.qos.logback.core.FileAppender"> <file>${defPath}/stop.log</file> <encoder> <pattern>${defPattern}</pattern> </encoder> </appender> <!-- 可配置一个特殊的自定义Logger,把所有错误日志额外输出到此文件,方便识别是否有错误发生 --> <!-- 理想健康的系统,此日志文件的大小应该为零。后续可根据此错误日志时间及内容,去主日志dms.log里头定位 --> <logger name="dms.logger.for.error.only" level="error" addtivity="false"> <appender-ref ref="dmsErrorLog"/> </logger> <!-- 启动环节需要记录日志时使用此自定义logger --> <logger name="dms.logger.for.start.only" level="error" addtivity="false"> <appender-ref ref="dmsStartLog"/> </logger> <!-- 停止环节需要记录日志时使用此自定义logger --> <logger name="dms.logger.for.stop.only" level="error" addtivity="false"> <appender-ref ref="dmsStopLog"/> </logger> <root level="INFO"> <appender-ref ref="console"/> <appender-ref ref="dmsLog"/> <appender-ref ref="dmsErrorLog"/> <appender-ref ref="dmsStartLog"/> </root> </configuration>
最新评论
mat插件可以检测内存数据
标识接口?
序列化serializabel就是一个标识
就差一个MAC了
mark
除了预置sql查询字段,其他我竟然都没用过
可以,这个问题遇到过
mybatis多个参数: 1. 注解(最常用) 2. 转化为对象或MAP 3. 按顺序(这个最蠢,写的代码看得费劲) 单个参数需要注意得: 1.基本数据类型随便写 2.数组用array,l