diff --git a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/utils/LogHelper.java b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/utils/LogHelper.java new file mode 100644 index 00000000..769724c9 --- /dev/null +++ b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/utils/LogHelper.java @@ -0,0 +1,15 @@ +package com.zyplayer.doc.manage.utils; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * 日志工具类 + */ +public class LogHelper { + // 通用日志,包括sql + public static final Logger LOG_COMMON = LoggerFactory.getLogger("LOG_COMMON"); + // 错误的日志打印 + public static final Logger LOG_ERROR = LoggerFactory.getLogger("LOG_ERROR"); +} diff --git a/zyplayer-doc-manage/src/main/resources/logback.xml b/zyplayer-doc-manage/src/main/resources/logback.xml index da5d6e66..c64c83b9 100644 --- a/zyplayer-doc-manage/src/main/resources/logback.xml +++ b/zyplayer-doc-manage/src/main/resources/logback.xml @@ -1,16 +1,45 @@ - - - - [%d{yyyy-MM-dd HH:mm:ss}][%-5level][%logger{0}] %msg%n - - - - - - - - - + + + + + + + ${outPattern} + + + + /web/logs/zyplayer-doc-manage/error.log + + /web/logs/zyplayer-doc-manage/error.%d{yyyy-MM-dd}.log + ${maxHistory} + + + ${outPattern} + + + + /web/logs/zyplayer-doc-manage/common.log + + /web/logs/zyplayer-doc-manage/common.%d{yyyy-MM-dd}.log + ${maxHistory} + + + ${outPattern} + + + + + + + + + + + + + + +