18034727885
2026-03-18 7804ce8edeba51418b5fde2d306e5f476dfb5993
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package cn.sinata.rxnetty;
 
import com.blankj.utilcode.util.LogUtils;
 
public class LogHelper {
 
    public static void initLogs() {
        LogUtils.Config config = LogUtils.getConfig();
        config.setSaveDays(7);
        config.setFilePrefix("gopost");
        config.setConsoleSwitch(true);
        config.setLog2FileSwitch(true);
        config.setSingleTagSwitch(true);
        config.setLogHeadSwitch(false);
 
        logRecord("MyApplication", "initLogs");
    }
 
    public static void logRecord(String name, String info) {
        String tag = name + " [" + Thread.currentThread().getName() + "-" + Thread.currentThread().getId() + "]";
        LogUtils.iTag(tag, info);
    }
}