Elvis Hew

Results 41 comments of Elvis Hew

@Witype 请问这是必现问题吗?这部分日志不是崩溃,只是在把日志写入到文件时失败了(因为线程被打断)。 “每一次启动日志文件夹名都会生成新的名称” 需要检查你所配置的命名规则。

如果不想写入文件的同时,接受不同时写到 Logcat,在初始化时指定 `BlacklistTagsFilterInterceptor` 过滤掉指定 tag 即可。 如果只是不想写入文件,但希望能打印到 Logcat,可自己组装一个 `Printer`,里面包装一个 `AndroidPrinter` 和一个 `FilePrinter`,并在调用 `FilePrinter.print` 前对 tag 进行过滤。

日志是在工作线程写入到文件。要看多频繁,一秒写几百条,那肯定影响的

For performance, load process info only once. ```java static String procName = loadProcessName(); static int pid = loadPid(); ``` You can add an `Interceptor` when initializing xLog, and append `procName`...

> But I don't understand why design tag for global in default.In my case I need tag for current class. I found that use Xlog.tag(xx) to custom tag,but invoke xlog.tag(xxx)...

> 你好,我发现App启动时,偶尔会出现日志文件内容被覆盖掉了,而不是追加。我设置的是最多一个备份文件。这个什么原因呢? @yjtacx 请问是怎么设置的?暂时没听说过这个问题

@yjtacx 清理策略是怎样的,有没有可能在打开APP时,刚好清理策略生效,旧的日志被清了?

如果已经设置了 NeverCleanStrategy,那应该不是 xlog 删除的日志,可能是别的程序(如清理软件)删除的。试试将日志保存到其他文件夹

> Hi > I'd like to know if the xlog contains the vulnerabilty similar to log4j? > I checked there is no file with jndi interface. but I'd like to...

@chenchongyu You can use a `Interceptor`. Set `threadInfo` to `null` when `level` is NOT `ERROR`. ```java intercept(log) { if (log.level < ERROR) { log.threadInfo = null; return log; } }...