public abstract class AQBPLogger
extends java.lang.Object
There are two types of errors:
Configuration errors can be added to the configuration object as notes in addition to being logged. This can be turned on and off.
Modifier and Type | Class and Description |
---|---|
static class |
AQBPLogger.LogLevel
The different logging levels supported.
|
static class |
AQBPLogger.QBPConfigException
Exception thrown if in exception mode for configuration errors.
|
static class |
AQBPLogger.QBPException
Exception thrown if in exception mode for standard errors.
|
Constructor and Description |
---|
AQBPLogger()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getConfigNoteCount() |
boolean |
isConfigExceptionModeOn() |
boolean |
isStandardExceptionModeOn() |
java.lang.String |
logConfigError(java.lang.String error_msg)
Log a configuration error message.
|
java.lang.String |
logConfigError(java.lang.String error_msg,
java.lang.Throwable reason)
Log a configuration error message with an exception that caused the error.
|
void |
logConfigFatal(java.lang.String error_msg)
Log a configuration fatal message.
|
void |
logConfigFatal(java.lang.String error_msg,
java.lang.Throwable reason)
Log a configuration fatal message with an exception that caused the error.
|
java.lang.String |
logError(java.lang.String error_msg)
Log a standard error message.
|
java.lang.String |
logError(java.lang.String error_msg,
java.lang.Throwable reason)
Log a standard error message with an exception that caused the error.
|
void |
logFatal(java.lang.String error_msg)
Log a standard fatal message.
|
void |
logFatal(java.lang.String error_msg,
java.lang.Throwable reason)
Log a standard fatal message with an exception that caused the error.
|
java.lang.String |
logInfo(java.lang.String info_msg)
Log a general information message.
|
java.lang.String |
logTrace(java.lang.String trace_msg)
Log a trace message.
|
java.lang.String |
logWarning(java.lang.String warning_msg)
Log a warning message.
|
java.lang.String |
logWarning(java.lang.String warning_msg,
java.lang.Throwable reason)
Log a warning message with an exception that caused the warning.
|
boolean |
popConfig()
Pop a configuration item off the stack of configuration items.
|
void |
pushConfig(com.tibco.patterns.qbp.jaxb.ConfigItem new_config)
Push a new current configuration item onto the config item stack.
|
protected abstract java.lang.String |
sendConfigError(java.lang.String raw_msg)
Format a configuration error message and send it to the log.
|
protected abstract java.lang.String |
sendConfigError(java.lang.String raw_msg,
java.lang.Throwable reason)
Format a configuration error message and send it to the log with a reason.
|
protected abstract java.lang.String |
sendError(java.lang.String raw_msg)
Format an error message and send it to the log.
|
protected abstract java.lang.String |
sendError(java.lang.String raw_msg,
java.lang.Throwable reason)
Format an error message and send it to the log with a reason.
|
protected abstract java.lang.String |
sendInfo(java.lang.String raw_msg)
Format an information message and send it to the log.
|
protected abstract java.lang.String |
sendTrace(java.lang.String raw_msg)
Format a Trace message and send it to the log.
|
protected abstract java.lang.String |
sendWarning(java.lang.String raw_msg)
Format a warning message and send it to the log.
|
protected abstract java.lang.String |
sendWarning(java.lang.String raw_msg,
java.lang.Throwable reason)
Format a warning message with a reason and send it to the log.
|
void |
setConfig(com.tibco.patterns.qbp.jaxb.ConfigItem new_config)
Set the top level configuration item.
|
void |
setEnabledLevels(AQBPLogger.LogLevel... enabled_levels)
Set the log levels that are enabled.
|
void |
turnOffConfigExceptionMode()
Turn off configuration error exception mode.
|
void |
turnOffConfigNotes()
Turn off the adding of configuration errors to config object.
|
void |
turnOffStandardExceptionMode()
Turn off standard error exception mode.
|
void |
turnOnConfigExceptionMode()
Turn on configuration error exception mode.
|
void |
turnOnConfigNotes()
Turn on the adding of configuration errors to config object.
|
void |
turnOnStandardExceptionMode()
Turn on standard error exception mode.
|
public AQBPLogger()
public void turnOnConfigNotes()
public void turnOffConfigNotes()
public int getConfigNoteCount()
public void turnOnConfigExceptionMode()
public void turnOffConfigExceptionMode()
public boolean isConfigExceptionModeOn()
public void turnOnStandardExceptionMode()
public void turnOffStandardExceptionMode()
public boolean isStandardExceptionModeOn()
public void setEnabledLevels(AQBPLogger.LogLevel... enabled_levels)
enabled_levels
- the list of all log levels that are
enabled. All other levels are ignored.public void pushConfig(com.tibco.patterns.qbp.jaxb.ConfigItem new_config)
new_config
- the new configuration item.public boolean popConfig()
public void setConfig(com.tibco.patterns.qbp.jaxb.ConfigItem new_config)
new_config
- the configuration item that should become the
top level item on the stack.public void logFatal(java.lang.String error_msg) throws AQBPLogger.QBPException
error_msg
- the message to be logged.AQBPLogger.QBPException
- always thrown.public void logFatal(java.lang.String error_msg, java.lang.Throwable reason) throws AQBPLogger.QBPException
error_msg
- the message to be logged.reason
- an exception that triggered this error message.AQBPLogger.QBPException
- always thrown.public java.lang.String logError(java.lang.String error_msg) throws AQBPLogger.QBPException
error_msg
- the message to be logged.AQBPLogger.QBPException
- if exception mode is enabled.public java.lang.String logError(java.lang.String error_msg, java.lang.Throwable reason) throws AQBPLogger.QBPException
error_msg
- the message to be logged.reason
- an exception that triggered this error message.AQBPLogger.QBPException
- if exception mode is enabled.public void logConfigFatal(java.lang.String error_msg) throws AQBPLogger.QBPConfigException
error_msg
- the message to be logged.AQBPLogger.QBPConfigException
- always thrown.public void logConfigFatal(java.lang.String error_msg, java.lang.Throwable reason) throws AQBPLogger.QBPConfigException
error_msg
- the message to be logged.reason
- an exception that triggered this error message.AQBPLogger.QBPConfigException
- always thrown.public java.lang.String logConfigError(java.lang.String error_msg) throws AQBPLogger.QBPConfigException
error_msg
- the message to be logged.AQBPLogger.QBPConfigException
- if exception mode is enabled.public java.lang.String logConfigError(java.lang.String error_msg, java.lang.Throwable reason) throws AQBPLogger.QBPConfigException
error_msg
- the message to be logged.reason
- an exception that triggered this error message.AQBPLogger.QBPConfigException
- if exception mode is enabled.public java.lang.String logWarning(java.lang.String warning_msg)
warning_msg
- the warning message to be logged.public java.lang.String logWarning(java.lang.String warning_msg, java.lang.Throwable reason)
warning_msg
- the message to be logged.reason
- an exception that triggered this warning message.public java.lang.String logInfo(java.lang.String info_msg)
info_msg
- the message to be logged.public java.lang.String logTrace(java.lang.String trace_msg)
trace_msg
- the message to be logged.protected abstract java.lang.String sendError(java.lang.String raw_msg)
raw_msg
- the error message.protected abstract java.lang.String sendError(java.lang.String raw_msg, java.lang.Throwable reason)
raw_msg
- the error message.reason
- the thrown exception that triggered this call.protected abstract java.lang.String sendConfigError(java.lang.String raw_msg)
raw_msg
- the error message.protected abstract java.lang.String sendConfigError(java.lang.String raw_msg, java.lang.Throwable reason)
raw_msg
- the error message.reason
- the thrown exception that triggered this call.protected abstract java.lang.String sendWarning(java.lang.String raw_msg)
raw_msg
- the error message.protected abstract java.lang.String sendWarning(java.lang.String raw_msg, java.lang.Throwable reason)
raw_msg
- the error message.reason
- the thrown exception that triggered this call.protected abstract java.lang.String sendInfo(java.lang.String raw_msg)
raw_msg
- the error message.protected abstract java.lang.String sendTrace(java.lang.String raw_msg)
raw_msg
- the error message.