Class SupportLogger
SupportLogger class that provides support for the new SUPPORT log level type. The SUPPORT log level is independent of any configured logging framework and should be able to be configured independently.
This Logger was originally built as an extension to Log4j's org.apache.log4j.Logger
. As a result,
other levels must be supported to maintain backwards compatibility.
It is important to note that the SupportLogger can be called outside a Spring Context.
Therefore, it is possible to instantiate a different SupportLogger adapter using
the fully qualified class name of an implementation using a System Property.
By default, it will instantiate a SystemSupportLoggerAdapter
if none is specified.
For example, you may wish to disable all logs made to the Support Logger by setting the following System Property:
-DSupportLogger.adapter.fqcn=org.broadleafcommerce.common.logging.DisableSupportLoggerAdapter
The main requirements for SUPPORT level logging are to:
- show up in the logs as a SUPPORT item (not ERROR or WARN etc...)
- always show up unless configured otherwise, as we want users to always see SUPPORT messages
- allow state messages to be associated with the log (e.g. "Enterprise Module — …")
- Author:
- Jeff Fischer, elbertbautista
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
In order to be backwards compatible.void
void
void
void
void
static String
void
void
void
lifecycle
(LifeCycleEvent lifeCycleEvent, Object message) emit a SUPPORT lifecycle messagevoid
emit a SUPPORT level messagevoid
emit a SUPPORT level message with throwablevoid
void
-
Field Details
-
FQCN_KEY
- See Also:
-
-
Constructor Details
-
SupportLogger
-
-
Method Details
-
getSupportLoggerAdapterFQCN
-
support
emit a SUPPORT level message- Parameters:
message
-
-
support
emit a SUPPORT level message with throwable- Parameters:
message
-t
-
-
lifecycle
emit a SUPPORT lifecycle message- Parameters:
lifeCycleEvent
-message
-
-
debug
In order to be backwards compatible. The support logger should also support the debug, error, fatal, info, and warn levels as well.- Parameters:
message
-
-
debug
-
error
-
error
-
fatal
-
fatal
-
info
-
info
-
warn
-
warn
-