From 9bf59da444f775819d3d5f72c4bb242a5c3b2cb0 Mon Sep 17 00:00:00 2001 From: LamGC Date: Fri, 10 Apr 2020 21:58:56 +0800 Subject: [PATCH] =?UTF-8?q?[Add]=20=E5=A2=9E=E5=8A=A0=20Mirai=20=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E4=BE=9D=E8=B5=96=E9=A1=B9,=20=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E7=B3=BB=E7=BB=9F(Log4j=20->=20Log4j2);=20[U?= =?UTF-8?q?pdate]=20=E5=B0=86Log4j=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E4=B8=BALog4j2=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 58 +++++++++++++++++++++++++++-- src/main/resources/log4j.properties | 15 -------- src/main/resources/log4j2.xml | 39 +++++++++++++++++++ 3 files changed, 94 insertions(+), 18 deletions(-) delete mode 100644 src/main/resources/log4j.properties create mode 100644 src/main/resources/log4j2.xml diff --git a/pom.xml b/pom.xml index 7cbb0e3..38a9f18 100644 --- a/pom.xml +++ b/pom.xml @@ -8,10 +8,22 @@ CGJ_2 1.0-SNAPSHOT + + + jcenter-aliyun + + http://maven.aliyun.com/nexus/content/repositories/jcenter + + + UTF-8 UTF-8 UTF-8 + 0.32.0 + 1.1.1 + 1.3.71 + 1.3.2 @@ -69,6 +81,20 @@ + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version} + + + compile + process-sources + + compile + + + + @@ -78,16 +104,18 @@ proxyee 1.0.4 + org.slf4j slf4j-api 1.7.30 - org.slf4j - slf4j-log4j12 - 1.7.30 + org.apache.logging.log4j + log4j-slf4j-impl + 2.13.1 + net.lamgc java-utils @@ -143,6 +171,10 @@ ch.qos.logback logback-core + + org.apache.logging.log4j + log4j-to-slf4j + @@ -150,6 +182,26 @@ jedis 3.2.0 + + net.mamoe + mirai-core-jvm + ${mirai.CoreVersion} + + + net.mamoe + mirai-core-qqandroid-jvm + ${mirai.CoreVersion} + + + net.mamoe + mirai-japt + ${mirai.JaptVersion} + + + io.ktor + ktor-server-core + ${ktor.version} + \ No newline at end of file diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties deleted file mode 100644 index 16165dc..0000000 --- a/src/main/resources/log4j.properties +++ /dev/null @@ -1,15 +0,0 @@ -log4j.rootLogger = info,console,logfile - -#\u8BBE\u7F6Edebug\u65E5\u5FD7\u4FE1\u606F -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.Target=System.out -log4j.appender.console.layout=org.apache.log4j.PatternLayout -#[\u5E74.\u6708.\u65E5 \u65F6:\u5206:\u79D2,\u6BEB\u79D2 \u4F18\u5148\u7EA7] [\u7C7B\u5168\u540D.\u65B9\u6CD5\u540D:\u884C\u53F7][\u7EBF\u7A0B\u540D] \u65E5\u5FD7\u5185\u5BB9 -log4j.appender.console.layout.ConversionPattern=[%d{HH:mm:ss,SSS} %5p][%c.%M():%-3L][%t]: %m%n - -log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender -log4j.appender.logfile.File=logs/running.log. -log4j.appender.logfile.DatePattern=yyyy-MM-dd -log4j.appender.logfile.layout=org.apache.log4j.PatternLayout -#[\u65F6:\u5206:\u79D2,\u6BEB\u79D2 \u4F18\u5148\u7EA7] [\u7C7B\u5168\u540D.\u65B9\u6CD5\u540D:\u884C\u53F7][\u7EBF\u7A0B\u540D] \u65E5\u5FD7\u5185\u5BB9 -log4j.appender.logfile.layout.ConversionPattern=[%d{HH:mm:ss,SSS} %5p][%c.%M():%-3L][%t]: %m%n \ No newline at end of file diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml new file mode 100644 index 0000000..f2b09f1 --- /dev/null +++ b/src/main/resources/log4j2.xml @@ -0,0 +1,39 @@ + + + + ./logs + UTF-8 + [%-d{HH:mm:ss.SSS} %5level][%logger.%method():%-3L][%thread]: %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file