Package com.caplin.permissioning.logging
Class PermissioningLogger
java.lang.Object
com.caplin.permissioning.logging.PermissioningLogger
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 Summary
Modifier and TypeMethodDescriptionstatic void
Log a debug level messagestatic void
Log an info level message with items to be incorporated into the message stringstatic void
Log an error level messagestatic void
Log an error level message with items to be incorporated into the message stringstatic void
Log an info level messagestatic void
Log an info level message with items to be incorporated into the message stringstatic void
Log an warn level messagestatic void
Log a warn level message with items to be incorporated into the message stringstatic void
setLogger
(LoggerProvider logger) Set theLoggerProvider
that theLoggerProvider
will use.
-
Method Details
-
setLogger
Set theLoggerProvider
that theLoggerProvider
will use.- Parameters:
logger
- ThePermissioningLogger
to use when logging.
-
logError
Log an error level message- Parameters:
message
-
-
logError
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
Log an warn level message- Parameters:
message
-
-
logWarn
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
Log an info level message- Parameters:
message
-
-
logInfo
Log an info level message with items to be incorporated into the message string- Parameters:
message
-args
-
-
logDebug
Log a debug level message- Parameters:
message
-
-
logDebug
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();
-