修改日志

This commit is contained in:
Yutou 2024-05-04 18:21:46 +08:00
parent 5a7382d02c
commit c74033fed7
2 changed files with 6 additions and 2 deletions

View File

@ -2,13 +2,15 @@ package com.yutou.qqbot;
import com.yutou.napcat.http.NapCatApi;
import com.yutou.okhttp.HttpLoggingInterceptor;
import com.yutou.qqbot.utlis.ConfigTools;
import com.yutou.qqbot.utlis.RedisTools;
import lombok.val;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class QQBotApplication {
public static final String version = "QQBot v.1.6.2";
public static final String version = "QQBot v.1.7";
public static void main(String[] args) {
System.out.println("version = " + version);
@ -16,6 +18,8 @@ public class QQBotApplication {
NapCatApi.setLog(true);
RedisTools.initRedisPoolSub();
QQBotManager.getInstance();
val log = ConfigTools.load(ConfigTools.CONFIG, "service.log", Boolean.class);
NapCatApi.setLog(log);
//1
}

View File

@ -6,7 +6,7 @@ public class Log {
}
public static void i(Object log) {
if (ConfigTools.load(ConfigTools.CONFIG, "logout", boolean.class, false)) {
if (ConfigTools.load(ConfigTools.CONFIG, "service.log", boolean.class, false)) {
System.out.printf("[%s]%s%n",
AppTools.getToDayNowTimeToString(),
log