|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILogger
An interface for logging messages.
Method Summary | |
---|---|
java.io.File |
getErrorLogFile()
The file where errors are logged, if errors are logged to a separate file. |
long |
getExceptionCount()
Return the number of exceptions since startup |
java.util.Date |
getLastExceptionDate()
Return the date when the last exception has occured |
int |
getLevel()
Returns the log level. |
java.io.File |
getLogFile()
The file where messages are logged. |
java.io.PrintWriter |
getWriter()
Return the Writer to write some stuff to the log file. |
void |
log(java.lang.String str,
int level)
This method writes the given string into the logfile. |
void |
logError(java.lang.Throwable err)
Prints a header line and a stack trace for the given Error or Exception |
void |
logError(java.lang.Throwable err,
java.lang.String errHeader)
Prints a header line and a stack trace for the given Error or Exception |
void |
logError(java.lang.Throwable error,
java.lang.String errHeader,
int level)
Prints a header line and a stack trace for the given Error or Exception |
void |
restart()
Restart the Logger (reinitialize log file) |
Methods inherited from interface com.groiss.component.Service |
---|
isRunning, reconfigure |
Methods inherited from interface com.groiss.component.Lifecycle |
---|
shutdown, startup |
Method Detail |
---|
void log(java.lang.String str, int level)
str
- string to put into the logfilelevel
- the log level, an integer between 0 and 4void logError(java.lang.Throwable err)
long getExceptionCount()
java.util.Date getLastExceptionDate()
void logError(java.lang.Throwable err, java.lang.String errHeader)
err
- a Throwable objecaterrHeader
- the text for the header linevoid logError(java.lang.Throwable error, java.lang.String errHeader, int level)
error
- a Throwable objecterrHeader
- the text for the header linelevel
- an integer between 0 and 4. The exception is logged if greater or equal the log level,java.io.File getLogFile()
java.io.File getErrorLogFile()
java.io.PrintWriter getWriter()
int getLevel()
void restart()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |