Class PermissioningLogger

java.lang.Object
com.caplin.permissioning.logging.PermissioningLogger

public class PermissioningLogger extends Object
Provides way of injecting a different logging strategy for the Permissioning domain objects. Use setLogger(LoggerProvider) to redirect log messages to your LoggerProvider. If you want to log to the same log as the PermissioningDatasource you can use PermissioningLogger.log[level](...) within your code.
  • Method Details

    • setLogger

      public static void setLogger(LoggerProvider logger)
      Set the LoggerProvider that the LoggerProvider will use.
      Parameters:
      logger - The PermissioningLogger to use when logging.
    • logError

      public static void logError(String message)
      Log an error level message
      Parameters:
      message -
    • logError

      public static void logError(String message, Throwable t)
      Log an error level message with items to be incorporated into the message string
      Parameters:
      message - the message (non-parameterised)
      t - the Throwable to be logged
    • logWarn

      public static void logWarn(String message)
      Log an warn level message
      Parameters:
      message -
    • logWarn

      public static void logWarn(String message, Object... args)
      Log a warn level message with items to be incorporated into the message string
      Parameters:
      message - the message in the form "user name was: {0}"
      args - the arguments to substitute into the message e.g. user.getName();
    • logInfo

      public static void logInfo(String message)
      Log an info level message
      Parameters:
      message -
    • logInfo

      public static void logInfo(String message, Object... args)
      Log an info level message with items to be incorporated into the message string
      Parameters:
      message -
      args -
    • logDebug

      public static void logDebug(String message)
      Log a debug level message
      Parameters:
      message -
    • logDebug

      public static void logDebug(String message, Object... args)
      Log an info level message with items to be incorporated into the message string
      Parameters:
      message - the message in the form "user name was: {0}"
      args - the arguments to substitute into the message e.g. user.getName();