0

How can I configure MDC for play 2.7+, 2.8+? https://www.playframework.com/documentation/2.8.x/ScalaLogging

Is "Marker" a replacement for MDC?

Capacytron
  • 3,425
  • 6
  • 47
  • 80
  • 1
    MDC is local to a thread, so is not a good fit for asynchronous code where work is performed across multiple threads. This is mentioned in the documentation linked in your question: "Markers can be extremely useful, because they can carry contextual information across threads where MDC may not be available, by using a MarkerContext as an implicit parameter to methods to provide a logging context." Did you have a more specific question about it? – Tim Moore Jan 13 '22 at 22:22
  • Yes, how to use it? I want assign unique requestId for each request and output it to log using Logger. Don't follow how to do it... – Capacytron Jan 15 '22 at 21:27

0 Answers0