|
deegree 2.1 (2007/11/08 09:57 build-328-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 String |
defaultChannelName
|
| 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 |
entering()
Log a method entry. |
void |
entering(String sourceClass,
String sourceMethod)
Log a method entry. |
void |
entering(String sourceClass,
String sourceMethod,
Object[] arguments)
Log a method entry with parameters. |
void |
exiting()
Log a method return. |
void |
exiting(String sourceClass,
String sourceMethod)
Log a method return. |
void |
exiting(String sourceClass,
String sourceMethod,
Object[] arguments)
Log a method return with parameters. |
void |
init(Properties props)
|
abstract void |
logDebug(String message)
Log debug message |
abstract void |
logDebug(String message,
Throwable e)
Log debug message. |
void |
logDebugBinaryFile(File file,
byte[] data)
Logs the given binary data to the specified file if log level is set to LOG_DEBUG. |
void |
logDebugBinaryFile(String filePrefix,
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(File file,
String content)
Logs the given text to the specified file if log level is set to LOG_DEBUG. |
void |
logDebugFile(String filePrefix,
String fileSuffix,
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(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(String message,
Throwable e,
Map properties)
Log error with exception |
abstract void |
logInfo(String message)
Log info message |
abstract void |
logInfo(String message,
Throwable e)
Log info message |
abstract void |
logWarning(String message)
Log warning message |
abstract void |
logWarning(String message,
Throwable e)
Log warning message with exception |
protected void |
sendMail(String message,
Throwable ex,
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, logError, logError, logInfo, setLevel |
| Field Detail |
|---|
protected static String defaultChannelName
| Constructor Detail |
|---|
protected LoggerService()
| Method Detail |
|---|
public void init(Properties props)
init in interface ILogger
public final void logError(String message,
Throwable e,
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(String message)
logWarning in interface ILoggermessage - the log message
public abstract void logWarning(String message,
Throwable e)
logWarning in interface ILoggermessage - the log messagee - the exception to be loggedpublic abstract void logInfo(String message)
logInfo in interface ILoggermessage - the log message
public abstract void logInfo(String message,
Throwable e)
logInfo in interface ILoggermessage - the log messagee - the exception to be loggedpublic abstract void logDebug(String message)
logDebug in interface ILoggermessage - the log message
public abstract void logDebug(String message,
Throwable e)
logDebug in interface ILoggermessage - the log messagee - the exception to be logged
public void logDebugFile(File file,
String content)
LOG_DEBUG.
logDebugFile in interface ILoggerfile - file to log tocontent - text to be logged
public void logDebugFile(String filePrefix,
String fileSuffix,
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(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(File file,
byte[] data)
LOG_DEBUG.
logDebugBinaryFile in interface ILoggerfile - file to log todata - binary data to be logged
public void logDebugBinaryFile(String filePrefix,
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)public void entering()
entering in interface ILogger
public void entering(String sourceClass,
String sourceMethod,
Object[] arguments)
entering in interface ILoggerarguments - the parameters to be given
public void entering(String sourceClass,
String sourceMethod)
ILogger
entering in interface ILogger
public void exiting(String sourceClass,
String sourceMethod,
Object[] arguments)
ILogger
exiting in interface ILoggerpublic void exiting()
exiting in interface ILogger
public void exiting(String sourceClass,
String sourceMethod)
exiting in interface ILogger
protected void sendMail(String message,
Throwable ex,
Map properties)
message - message is in mail subjectex - full exception is displayed in bodyproperties - list of properties listed in body
|
deegree 2.1 (2007/11/08 09:57 build-328-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://deegree.sourceforge.net