public class SupportLogger extends Object
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 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:
Constructor and Description |
---|
SupportLogger(String moduleName,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
debug(Object message)
In order to be backwards compatible.
|
void |
debug(Object message,
Throwable t) |
void |
error(Object message) |
void |
error(Object message,
Throwable t) |
void |
fatal(Object message) |
void |
fatal(Object message,
Throwable t) |
static String |
getSupportLoggerAdapterFQCN() |
void |
info(Object message) |
void |
info(Object message,
Throwable t) |
void |
lifecycle(LifeCycleEvent lifeCycleEvent,
Object message)
emit a SUPPORT lifecycle message
|
void |
support(Object message)
emit a SUPPORT level message
|
void |
support(Object message,
Throwable t)
emit a SUPPORT level message with throwable
|
void |
warn(Object message) |
void |
warn(Object message,
Throwable t) |
public static final String FQCN_KEY
public void support(Object message)
message
- public void support(Object message, Throwable t)
message
- t
- public void lifecycle(LifeCycleEvent lifeCycleEvent, Object message)
lifeCycleEvent
- message
- public void debug(Object message)
message
- public void error(Object message)
public void fatal(Object message)
public void info(Object message)
public void warn(Object message)
public static String getSupportLoggerAdapterFQCN()
Copyright © 2022. All rights reserved.