|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LogService
Core platform service for managing different logs for messages from the application. Interaction with the actual log
(writing messages, checking verbosity) is managed via the Log interface. This packages is meant to be generic
enough to map to existing log facilities, such as java.util.logging or log4j.
Logs are maintained per application server when run in a load balanced environment. Verbosity goes from less to more messages: fatal, error, warning, information, debug.
LogService.Verbosity| Nested Class Summary | |
|---|---|
static class |
LogService.Verbosity
Enumeration of different log levels used in filtering log messages. |
| Method Summary | |
|---|---|
void |
defineNewFileLog(java.lang.String logName,
java.lang.String logFilePath,
LogService.Verbosity verbosity,
BbLocale locale,
boolean copyToConsole)
Convenience method to create a new file-based log. |
void |
defineNewFileLog(java.lang.String logName,
java.lang.String logFilePath,
LogService.Verbosity verbosity,
BbLocale locale,
boolean copyToConsole,
boolean canLogFileBeRenamed)
Convenience method to create a new file-based log. |
void |
defineNewFileLog(java.lang.String logName,
java.lang.String logFilePath,
LogService.Verbosity verbosity,
boolean copyToConsole)
Convenience method to create a new file-based log. |
Log |
getConfiguredLog(java.lang.String logName)
Returns a log that has been configured by name or null if one is not found. |
Log |
getDefaultLog()
Returns the Log instance configured as the default Log |
void |
setDefaultLog(Log defaultLog)
Sets the default Log instance to use. |
void |
setDefaultThreadLog(Log defaultLog)
Overrides the default Log instance to use in the current thread. |
| Methods inherited from interface blackboard.platform.CorePlatformService |
|---|
getServiceInterface, serviceInit, serviceShutdown, serviceStartup |
| Methods inherited from interface blackboard.platform.log.Log |
|---|
getLogFileName, getLogName, getVerbosityLevel, isDebugEnabled, log, log, logAudit, logAudit, logDebug, logDebug, logError, logError, logFatal, logFatal, logInfo, logInfo, logSqlWarnings, logSqlWarnings, logSqlWarnings, logSqlWarnings, logSqlWarnings, logWarning, logWarning, setVerbosityLevel |
| Method Detail |
|---|
void setDefaultLog(Log defaultLog)
Log instance to use.
defaultLog - Log instance to useLog getDefaultLog()
Log instance configured as the default Log
void setDefaultThreadLog(Log defaultLog)
Log instance to use in the current thread. All other threads will continue to use the
default log as set by setDefaultLog(blackboard.platform.log.Log).
The recommended pattern of use for this method is to set the override in a try block and revert to the default in an associated finally block.
defaultLog - Log to use for this thread. If null, the override will be removed and the global default will be
used again.Log getConfiguredLog(java.lang.String logName)
logName - Log to retrieve.
logName or null if none is found.
void defineNewFileLog(java.lang.String logName,
java.lang.String logFilePath,
LogService.Verbosity verbosity,
boolean copyToConsole)
throws BbServiceException
Note: This method is primarily for internal use and should be considered unstable and subject to change.
logName - Symbolic name for the new log.logFilePath - File name to hold log entries. Relative to Blackboard directory.verbosity - Verbosity levelcopyToConsole - Flag indicating whether to send log output to stdout as well
BbServiceException
void defineNewFileLog(java.lang.String logName,
java.lang.String logFilePath,
LogService.Verbosity verbosity,
BbLocale locale,
boolean copyToConsole)
throws BbServiceException
Note: This method is primarily for internal use and should be considered unstable and subject to change.
logName - Symbolic name for the new log.logFilePath - File name to hold log entries. Relative to Blackboard directory.verbosity - Verbosity levellocale - Desired locale of logcopyToConsole - Flag indicating whether to send log output to stdout as well
BbServiceException
void defineNewFileLog(java.lang.String logName,
java.lang.String logFilePath,
LogService.Verbosity verbosity,
BbLocale locale,
boolean copyToConsole,
boolean canLogFileBeRenamed)
throws BbServiceException
Note: This method is primarily for internal use and should be considered unstable and subject to change.
logName - Symbolic name for the new log.logFilePath - File name to hold log entries. Relative to Blackboard directory.verbosity - Verbosity levellocale - Desired locale of logcopyToConsole - Flag indicating whether to send log output to stdout as wellcanLogFileBeRenamed - Flag indicating whether to rename the log file
BbServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||