java.lang.Object
org.identityconnectors.common.logging.Log

public final class Log extends Object
Yet another logging abstraction.
  • Field Details

    • LOGSPI_PROP

      public static final String LOGSPI_PROP
      System property to set the logger class that is most appropriate.
    • LOGSPI_PROPS_FILE

      public static final String LOGSPI_PROPS_FILE
      Filename 'connectors.properties' used to for SPI class in the '$(java.home)/lib/' directory.
      See Also:
  • Method Details

    • getLog

      public static Log getLog(Class<?> clazz)
      Get the logger for the particular class. private static final Log LOG = Log.getLog(MyClass.class);
      Parameters:
      clazz - class to log information about.
      Returns:
      logger to use for logging.
    • getLog

      public static Log getLog(Class<?> clazz, String instanceName)
      Get the logger for the particular class. private static final Log LOG = Log.getLog(MyClass.class, instanceName);
      Parameters:
      clazz - class to log information about.
      instanceName - name of the instance to expose in the log.
      Returns:
      logger to use for logging.
    • isLoggable

      public boolean isLoggable(Log.Level level)
      Determine if its log-able at this level within this class.
    • log

      public void log(Class<?> clazz, String method, Log.Level level, String message, Throwable ex)
      Lowest level logging method.
      Parameters:
      clazz - Class that is being logged.
      method - Method name that is being logged.
      level - Logging level.
      message - Message about the log.
      ex - Exception to use process.
    • log

      public void log(Log.Level level, Throwable ex, String format, Object... args)
      Logs based on the parameters given. Uses the format parameter inside MessageFormat.
      Parameters:
      level - the logging level at which to write the message.
      ex - [optional] exception stack trace to log.
      format - [optional] create a message of a particular format.
      args - [optional] parameters to the format string.
    • ok

      public void ok(Throwable ex, String format, Object... args)
    • info

      public void info(Throwable ex, String format, Object... args)
    • warn

      public void warn(Throwable ex, String format, Object... args)
    • error

      public void error(Throwable ex, String format, Object... args)
    • ok

      public void ok(String format, Object... args)
    • info

      public void info(String format, Object... args)
    • warn

      public void warn(String format, Object... args)
    • error

      public void error(String format, Object... args)
    • isOk

      public boolean isOk()
    • isInfo

      public boolean isInfo()
    • isWarning

      public boolean isWarning()
    • isError

      public boolean isError()