Package mondrian.util

Class MDCUtil

java.lang.Object
mondrian.util.MDCUtil

public class MDCUtil extends Object
MdcUtil is a small helper class for copying log4j MDC context between threads. The main use case is for maintaining session, IP and user logging information down to the SQL and MDX level to track sensitive data access.
Author:
benny
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor is called on parent thread so a snapshot of the MDC context is saved here.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This is called on the child thread so the saved MDC context is copied into the child thread.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MDCUtil

      public MDCUtil()
      Constructor is called on parent thread so a snapshot of the MDC context is saved here.
  • Method Details

    • setContextMap

      public void setContextMap()
      This is called on the child thread so the saved MDC context is copied into the child thread.