kezhenxu94 commented on code in PR #323:
URL: https://github.com/apache/skywalking-python/pull/323#discussion_r1377013220
##########
skywalking/log/sw_logging.py:
##########
@@ -75,6 +77,9 @@ def build_log_tags() -> LogTags:
context = get_context()
+ if config.agent_log_print_tid:
+ record.tid = str(context.segment.related_traces[0])
Review Comment:
We add the `tid` info to the `record` only when `agent_log_print_tid ==
true`, but what if I set `SW_AGENT_LOG_REPORTER_LAYOUT='%(tid)s %(asctime)s
[%(threadName)s] %(levelname)s %(name)s - %(message)s` but `agent_log_print_tid
== false`? The implementation looks unreasonable to me, we have two ways to
modify the log layout which might be conflict with each other.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]