Skip to content

Instantly share code, notes, and snippets.

@adamw
Last active November 25, 2018 08:04
Show Gist options
  • Save adamw/87d6a3ea8437aa9583c9bb4eb7590b2c to your computer and use it in GitHub Desktop.
Save adamw/87d6a3ea8437aa9583c9bb4eb7590b2c to your computer and use it in GitHub Desktop.
class SetCorrelationIdInMDCFilter extends Filter[ILoggingEvent] {
override def decide(event: ILoggingEvent): FilterReply = {
CorrelationId().foreach(MDC.put("cid", _))
FilterReply.NEUTRAL
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment