[logback-user] Logging with custom code to provide the time

Will Sargent will.sargent at gmail.com
Fri Jan 29 13:21:18 CET 2021


Put the historic time in MDC and then pull it out using an encoder.

> On Jan 29, 2021, at 4:06 AM, Geng Li <ligeng0420 at googlemail.com> wrote:
> 
> 
> Hi,
> 
> I have a program which runs simulations in historic times. I would like the logging line to have the historic time instead of now so it is easier to debug. Is this possible? Is there some hook I can use to inject my custom time into the logging framework?
> 
> Thanks a lot.
> 
> Regards
> 
> Geng
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user


More information about the logback-user mailing list