有没有单独的开关来控制是否打印啊 大佬!
Closed this issue · 1 comments
hfshiwo commented
有没有单独的开关来控制是否打印啊 大佬!
elvishew commented
@hfshiwo xLog is designed to not support such feature.
However, you can still switch the logging on/off in runtime. Just wrap your real printer(or printer set) when you initialize xLog, like the code below.
XLog.init(new Printer() {
@Override
public void println(int logLevel, String tag, String msg) {
if (switchIsOn) {
realPrinter.println(logLevel, tag, msg);
}
}
});
Hope this help you.