Class Log4JNDC

  • All Implemented Interfaces:
    NDCDelegate

    public class Log4JNDC
    extends java.lang.Object
    implements NDCDelegate
    A stand in for the org.apache.log4j.NDC class that avoids introducing runtime dependencies against the otherwise optional log4j.
    Author:
    dward
    • Constructor Summary

      Constructors 
      Constructor Description
      Log4JNDC()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void push​(java.lang.String message)
      Push new diagnostic context information for the current thread.
      void remove()
      Remove the diagnostic context for this thread.
      • Methods inherited from class java.lang.Object

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

      • Log4JNDC

        public Log4JNDC()
    • Method Detail

      • push

        public void push​(java.lang.String message)
        Push new diagnostic context information for the current thread.
        Specified by:
        push in interface NDCDelegate
        Parameters:
        message - The new diagnostic context information.
      • remove

        public void remove()
        Remove the diagnostic context for this thread.
        Specified by:
        remove in interface NDCDelegate