From 3f256c5a0add9c9e2621be9ba177a28f56cb63ea Mon Sep 17 00:00:00 2001 From: LamGC Date: Wed, 10 Jun 2020 15:46:33 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=20log4j2.xml=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E9=85=8D=E7=BD=AE=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98;=20[Change]=20BotGlobal,=20Main=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=92=8C=E7=BA=A7=E5=88=AB;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/net/lamgc/cgj/Main.java | 2 +- .../java/net/lamgc/cgj/bot/boot/BotGlobal.java | 2 +- src/main/resources/log4j2.xml | 16 +++------------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/main/java/net/lamgc/cgj/Main.java b/src/main/java/net/lamgc/cgj/Main.java index 39651ac..e7c86ec 100644 --- a/src/main/java/net/lamgc/cgj/Main.java +++ b/src/main/java/net/lamgc/cgj/Main.java @@ -52,7 +52,7 @@ public class Main { private static HttpHost proxy; public static void main(String[] args) throws IOException, ClassNotFoundException { - log.trace("ContentGrabbingJi 正在启动..."); + log.info("ContentGrabbingJi 正在启动..."); log.debug("Args: {}, LogsPath: {}", Arrays.toString(args), System.getProperty("cgj.logsPath")); log.debug("运行目录: {}", System.getProperty("user.dir")); diff --git a/src/main/java/net/lamgc/cgj/bot/boot/BotGlobal.java b/src/main/java/net/lamgc/cgj/bot/boot/BotGlobal.java index 890e57e..d9d9a31 100644 --- a/src/main/java/net/lamgc/cgj/bot/boot/BotGlobal.java +++ b/src/main/java/net/lamgc/cgj/bot/boot/BotGlobal.java @@ -61,7 +61,7 @@ public final class BotGlobal { try (Jedis jedis = this.redisServer.getResource()) { log.warn("Redis连接状态(Ping): {}", jedis.ping().equalsIgnoreCase("pong")); } catch(JedisConnectionException e) { - log.warn("Redis连接失败, 将会影响到后续功能运行.", e); + log.warn("Redis连接失败, 将会影响到后续功能运行.({})", e.getCause().getMessage()); } String dataStoreDirPath = System.getProperty("cgj.botDataDir"); diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index dd5828b..a0c5954 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -19,7 +19,7 @@ - + @@ -46,19 +46,9 @@ - - - - - - - - - - - - + +