Class DfLogger

java.lang.Object
com.documentum.fc.common.DfLogger

public final class DfLogger extends Object
A DfLogger object is used to log messages for a specific system or application component. Loggers are normally named, using a hierarchical dot-separated namespace. Logger names can be arbitrary strings, but they should normally be based on the package name or class name of the logged component.
  • Constructor Details

    • DfLogger

      public DfLogger()
  • Method Details

    • fatal

      public static void fatal(Object source, String message, Object[] params, Throwable t)
      Logs a localized and parameterized message with the Level.FATAL logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • fatal

      public static void fatal(Object source, String message, String[] params, Throwable t)
      Logs a localized and parameterized message with the Level.FATAL logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • error

      public static void error(Object source, String message, Object[] params, Throwable t)
      Logs a localized and parameterized message with the Level.ERROR logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • error

      public static void error(Object source, String message, String[] params, Throwable t)
      Logs a localized and parameterized message with the Level.ERROR logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • warn

      public static void warn(Object source, String message, Object[] params, Throwable t)
      Logs a localized and parameterized message with the Level.WARN logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • warn

      public static void warn(Object source, String message, String[] params, Throwable t)
      Logs a localized and parameterized message with the Level.WARN logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • info

      public static void info(Object source, String message, Object[] params, Throwable t)
      Logs a localized and parameterized message with the Level.INFO logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • info

      public static void info(Object source, String message, String[] params, Throwable t)
      Logs a localized and parameterized message with the Level.INFO logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • debug

      public static void debug(Object source, String message, Object[] params, Throwable t)
      Logs a localized and parameterized message with the Level.DEBUG logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • debug

      public static void debug(Object source, String message, String[] params, Throwable t)
      Logs a localized and parameterized message with the Level.DEBUG logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • trace

      public static void trace(Object source, String message, Object[] params, Throwable t)
      Logs a localized and parameterized trace message with the Level.DEBUG logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • trace

      public static void trace(Object source, String message, String[] params, Throwable t)
      Logs a localized and parameterized trace message with the Level.DEBUG logging level.

      First, the user supplied message key is used to lookup a localized message pattern in a resource bundle. Next, the resulting pattern is formatted using MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) with the user supplied object parameters.

      Parameters:
      source - the logger identifier
      message - the message or identifier of a message to log
      params - parameters to use when formating message
      t - a throwable to log, may be null.
    • isFatalEnabled

      public static boolean isFatalEnabled(Object source)
      Indicates whether the Level.FATAL logging level is currently enabled.

      This allows expensive operations such as String concatenation to be avoided when the message will be ignored by the logger.

      Parameters:
      source - the logger identifier
      Returns:
      true if the is level enabled
    • isErrorEnabled

      public static boolean isErrorEnabled(Object source)
      Indicates whether the Level.ERROR logging level is currently enabled.

      This allows expensive operations such as String concatenation to be avoided when the message will be ignored by the logger.

      Parameters:
      source - the logger identifier
      Returns:
      true if the is level enabled
    • isWarnEnabled

      public static boolean isWarnEnabled(Object source)
      Indicates whether the Level.WARN logging level is currently enabled.

      This allows expensive operations such as String concatenation to be avoided when the message will be ignored by the logger.

      Parameters:
      source - the logger identifier
      Returns:
      true if the is level enabled
    • isInfoEnabled

      public static boolean isInfoEnabled(Object source)
      Indicates whether the Level.INFO logging level is currently enabled.

      This allows expensive operations such as String concatenation to be avoided when the message will be ignored by the logger.

      Parameters:
      source - the logger identifier
      Returns:
      true if the is level enabled
    • isDebugEnabled

      public static boolean isDebugEnabled(Object source)
      Indicates whether the Level.DEBUG logging level is currently enabled.

      This allows expensive operations such as String concatenation to be avoided when the message will be ignored by the logger.

      Parameters:
      source - the logger identifier
      Returns:
      true if the is level enabled
    • isTraceEnabled

      public static boolean isTraceEnabled(Object source)
      Indicates whether tracing is currently enabled.

      This allows expensive operations such as String concatenation to be avoided when the message will be ignored by the logger.

      Parameters:
      source - the logger identifier
      Returns:
      true if tracing is enabled
    • getLogger

      public static org.apache.logging.log4j.Logger getLogger(Object source)
      Returns a logger named according to the value of the source parameter. If the named logger already exists, then the existing instance will be returned. Otherwise, a new instance is created.
      Parameters:
      source - the logger identifier
    • getRootLogger

      public static org.apache.logging.log4j.Logger getRootLogger()
      Returns the root logger
    • setClientContext

      public static void setClientContext(String prefix)
    • restoreClientContext

      public static void restoreClientContext()
    • mute

      public static void mute(boolean fMode)
      Mute or unmute logging for the given thread
      Parameters:
      fMode - true to mute, false to unmute.
    • registerResourceBundle

      public static void registerResourceBundle(ResourceBundle bundle)
      Registers a resource bundle containing localized log message test.
      Parameters:
      bundle - the resource bundle
    • getFullMessage

      public static String getFullMessage(String message, String[] params)
      Since:
      5.2
    • getFullMessage

      public static String getFullMessage(String message, Object[] params)