UladzislauBlok opened a new pull request, #19517:
URL: https://github.com/apache/kafka/pull/19517

   This PR fixes an issue where the thread name shown in log messages did not 
match the actual execution context. Previously, log entries displayed the 
context of the newly created thread, while the logger reflected the current 
executing thread. This mismatch led to confusion and made log tracing more 
difficult.
   
   Logs before fix:
   `18:20:42.861 [main] INFO  o.a.k.s.p.internals.StreamThread - stream-thread 
[streams-linesplit-68754e82-1561-4482-a6cb-9f4b486c84ca-StreamThread-1] 
Creating restore consumer client
   18:20:42.969 [main] INFO  o.a.k.s.p.internals.StreamThread - stream-thread 
[streams-linesplit-68754e82-1561-4482-a6cb-9f4b486c84ca-StreamThread-1] 
Creating consumer client`
   
   Logs after fix:
   `18:33:02.098 [main] INFO  o.a.k.s.p.internals.StreamThread - Creating 
restore consumer client for thread 
streams-linesplit-b7f8e5ab-841c-4fc9-8902-7fe9c9c06f55-StreamThread-1
   18:33:02.214 [main] INFO  o.a.k.s.p.internals.StreamThread - Creating 
consumer client for thread 
streams-linesplit-b7f8e5ab-841c-4fc9-8902-7fe9c9c06f55-StreamThread-1`
   
   Changes:
   - Use logger without context to not have context
   - Updated log messages to explicitly describe the thread being created
   - Fixed instances where the log context reflected the current thread instead 
of the newly created one
   


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to