0

I am using MDC to track the logs in GCP,it is tracking all the logs present in code but the flow is going in one jar file containing some loggers but those loggers are not getting tracked with MDC.

MDC.put(CommonConstants.REQUEST_ID, UUID.randomUUID().toString());

console log appender

 <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <layout class="ch.qos.logback.classic.PatternLayout">
            <Pattern>
             
 [%d{MM/dd/yy HH:mm:ss:SSS zzz}] %5p |%t| [%logger]  - [Request-Id: %X{RequestId}]- %m%n
            </Pattern>`your text`
        </layout>
    </appender>

need a way to use requestId which tracks jar file logs

  • Can you give more information about your use case and the problem you have with it? What target environment are you using in the GCP? – Ben Apr 24 '23 at 11:36

0 Answers0