fix: atexit destroy default logger multithreading env bug #783
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
遇到HttpServer loop_thread 中的日志 EventLoop started消息 和 EventLoop stopped消息 日志文件意外分离,经过排查发现原因如下
hlog_set_file或hlog_set_xxxx各种设置后,在httpserver多线程或自己的业务线程运行时,外部执行 -s stop 或 -s restart 触发 signal_handler 或其他形式的原因只要调用 exit 就会触发 atexit 的 hv_destroy_default_logger销毁,此时其他工作线程使用的logger被重置导致开头的hlog_set_各类设置失效。
我发现其他人也遇到过类似现象 #171