Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

写文件的 Worker 不用手动 quit 么 #153

Open
yongjiaming opened this issue Apr 15, 2024 · 3 comments
Open

写文件的 Worker 不用手动 quit 么 #153

yongjiaming opened this issue Apr 15, 2024 · 3 comments

Comments

@yongjiaming
Copy link

No description provided.

@livelitoday
Copy link

这是个bug吧,只要配置了AndroidPrinter就会一致打印。。。

@yongjiaming
Copy link
Author

这是个bug吧,只要配置了AndroidPrinter就会一致打印。。。

你不调 Logger.d/e() 这些函数就不会打印呀

@yongjiaming
Copy link
Author

yongjiaming commented Jul 17, 2024

@Override
    public void run() {
      LogItem log;
      try {
        while ((log = logs.take()) != null) {
          doPrintln(log.timeMillis, log.level, log.tag, log.msg);
        }
      } catch (InterruptedException e) {
        e.printStackTrace();
        synchronized (this) {
          started = false;
        }
      }
    }
logs 消费完了会阻塞,没有手动 quit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants