|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.framework.log.LoggerService
abstract class LoggerService
The Logger is used to log messages to files. This service will use a logging service provided by the application server or a 3rd party logging service such as Apache Log4J to enable asychronous call of the method log(). The log server is configured by a set of Properties which are provided to the class init.
There are some global properties as well:
Messages are logged using log(). If an error occurs during creation or logging, the message will be written to the server BootLogger.
LoggerFactory,
BootLogger| Field Summary | |
|---|---|
protected static java.lang.String |
defaultChannelName
the log channel name |
| Fields inherited from interface org.deegree.framework.log.ILogger |
|---|
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING |
| Constructor Summary | |
|---|---|
protected |
LoggerService()
Create logger instance |
| Method Summary | |
|---|---|
void |
init(java.util.Properties props)
|
abstract void |
logDebug(java.lang.String message)
Log debug message |
abstract void |
logDebug(java.lang.String message,
java.lang.Throwable e)
Log debug message. |
void |
logDebugBinaryFile(java.io.File file,
byte[] data)
Logs the given binary data to the specified file if log level is set to LOG_DEBUG. |
void |
logDebugBinaryFile(java.lang.String filePrefix,
java.lang.String fileSuffix,
byte[] data)
Logs the given binary data to a temporary file (created from specified prefix and suffix) if log level is set to LOG_DEBUG. |
void |
logDebugFile(java.io.File file,
java.lang.String content)
Logs the given text to the specified file if log level is set to LOG_DEBUG. |
void |
logDebugFile(java.lang.String filePrefix,
java.lang.String fileSuffix,
java.lang.String content)
Logs the given text to a temporary file (created from specified prefix and suffix) if log level is set to LOG_DEBUG. |
void |
logDebugXMLFile(java.lang.String filePrefix,
XMLFragment fragment)
Logs the given XMLFragment to a temporary file (created from specified prefix and suffix ".xml") if log
level is set to LOG_DEBUG. |
void |
logError(java.lang.String message,
java.lang.Throwable e,
java.util.Map<?,?> properties)
Log error with exception |
abstract void |
logInfo(java.lang.String message)
Log info message |
abstract void |
logInfo(java.lang.String message,
java.lang.Throwable e)
Log info message |
abstract void |
logWarning(java.lang.String message)
Log warning message |
abstract void |
logWarning(java.lang.String message,
java.lang.Throwable e)
Log warning message with exception |
protected void |
sendMail(java.lang.String message,
java.lang.Throwable ex,
java.util.Map<?,?> properties)
Sends email with exception string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.deegree.framework.log.ILogger |
|---|
bindClass, bindClass, getLevel, isDebug, log, log, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, setLevel |
| Field Detail |
|---|
protected static java.lang.String defaultChannelName
| Constructor Detail |
|---|
protected LoggerService()
| Method Detail |
|---|
public void init(java.util.Properties props)
init in interface ILogger
public final void logError(java.lang.String message,
java.lang.Throwable e,
java.util.Map<?,?> properties)
message - the log messagee - the exception to be loggedproperties - a given Property file in which specific email notification possibilities are saved.public abstract void logWarning(java.lang.String message)
logWarning in interface ILoggermessage - the log message
public abstract void logWarning(java.lang.String message,
java.lang.Throwable e)
logWarning in interface ILoggermessage - the log messagee - the exception to be loggedpublic abstract void logInfo(java.lang.String message)
logInfo in interface ILoggermessage - the log message
public abstract void logInfo(java.lang.String message,
java.lang.Throwable e)
logInfo in interface ILoggermessage - the log messagee - the exception to be loggedpublic abstract void logDebug(java.lang.String message)
logDebug in interface ILoggermessage - the log message
public abstract void logDebug(java.lang.String message,
java.lang.Throwable e)
logDebug in interface ILoggermessage - the log messagee - the exception to be logged
public void logDebugFile(java.io.File file,
java.lang.String content)
LOG_DEBUG.
logDebugFile in interface ILoggerfile - file to log tocontent - text to be logged
public void logDebugFile(java.lang.String filePrefix,
java.lang.String fileSuffix,
java.lang.String content)
LOG_DEBUG.
logDebugFile in interface ILoggerfilePrefix - prefix for the temp file namefileSuffix - suffix for the temp file name, can be null (then ".tmp" is used)content - text to be loggedFile.createTempFile(String, String)
public void logDebugXMLFile(java.lang.String filePrefix,
XMLFragment fragment)
XMLFragment to a temporary file (created from specified prefix and suffix ".xml") if log
level is set to LOG_DEBUG.
logDebugXMLFile in interface ILoggerfilePrefix - prefix for the temp file namefragment - XMLFragment to be logged (will be pretty-printed)
public void logDebugBinaryFile(java.io.File file,
byte[] data)
LOG_DEBUG.
logDebugBinaryFile in interface ILoggerfile - file to log todata - binary data to be logged
public void logDebugBinaryFile(java.lang.String filePrefix,
java.lang.String fileSuffix,
byte[] data)
LOG_DEBUG.
logDebugBinaryFile in interface ILoggerfilePrefix - prefix for the temp file namefileSuffix - suffix for the temp file name, can be null (then ".tmp" is used)data - binary data to be loggedFile.createTempFile(String, String)
protected void sendMail(java.lang.String message,
java.lang.Throwable ex,
java.util.Map<?,?> properties)
message - message is in mail subjectex - full exception is displayed in bodyproperties - list of properties listed in body
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org