lifepuzzlefun commented on PR #20577:
URL: https://github.com/apache/pulsar/pull/20577#issuecomment-1593146291

   @hangc0276 hi, can we only apply this config to mdc logger like below, most 
of pulsar logger did not use mdc 
   ```
   <?xml version="1.0" encoding="UTF-8"?>
   <Configuration status="WARN">
       <Appenders>
           <Console name="Console" target="SYSTEM_OUT">
               <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level 
%logger{36} - %msg%n"/>
           </Console>
           <Console name="ConsoleWithMDC" target="SYSTEM_OUT">
               <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level 
%logger{36} - %X{myKey} - %msg%n"/>
           </Console>
       </Appenders>
       <Loggers>
           <Logger name="com.mycompany.ClassWithoutMDC" level="info" 
additivity="false">
               <AppenderRef ref="Console"/>
           </Logger>
           <Logger name="com.mycompany.ClassWithMDC" level="info" 
additivity="false">
               <AppenderRef ref="ConsoleWithMDC"/>
           </Logger>
           <Root level="error">
               <AppenderRef ref="Console"/>
           </Root>
       </Loggers>
   </Configuration>
   ```


-- 
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]

Reply via email to