|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.talika.tarsis.service.AbstractService
org.talika.tarsis.log.LoggerService
org.talika.tarsis.log.FileLogger
Implementation of Logger interface that writes messages to a given
file.
| Field Summary |
|---|
| Fields inherited from interface org.talika.tarsis.log.Logger |
|---|
DEBUG, ERROR, INFO, PANIC, WARNING |
| Constructor Summary | |
|---|---|
FileLogger()
Creates a new FileLogger. |
|
| Method Summary | |
|---|---|
void |
destroy()
Called by the framework to indicate that is being placed out of service. |
java.lang.String |
getLogFileName()
Returns log file name parameter. |
java.lang.String |
getName()
Returns name of service. |
void |
init(Context context)
Called by the framework to indicate that is being placed into service. |
void |
setLogFileName(java.lang.String logFileName)
Sets log file name parameter. |
protected void |
writeLog(int level,
java.lang.String msg)
Writes a log message to log file. |
protected void |
writeLog(int level,
java.lang.String msg,
java.lang.Throwable t)
Writes an error log message to log file. |
| Methods inherited from class org.talika.tarsis.log.LoggerService |
|---|
formatLog, getLogLevel, isDebugEnabled, isErrorEnabled, isInfoEnabled, isPanicEnabled, isWarningEnabled, log, log, logDebug, logError, logInfo, logPanic, logPanic, logWarning, setLogLevel |
| Methods inherited from class org.talika.tarsis.service.AbstractService |
|---|
getContext, getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileLogger()
FileLogger.
| Method Detail |
public void init(Context context)
throws ServiceException
init in interface Serviceinit in class AbstractServicecontext - Context context that initialized service.
ServiceException - if an exception has occurred that interferes with the
services's normal operationService.init(Context)public void destroy()
destroy in interface Servicedestroy in class AbstractServiceService.destroy()public java.lang.String getName()
getName in interface ServicegetName in class AbstractServiceService.getName()public void setLogFileName(java.lang.String logFileName)
logFileName - String file name parameter.public java.lang.String getLogFileName()
protected void writeLog(int level,
java.lang.String msg)
writeLog in class LoggerServicelevel - int log level.msg - String message.
protected void writeLog(int level,
java.lang.String msg,
java.lang.Throwable t)
writeLog in class LoggerServicelevel - int log level.msg - String message.t - Throwable a Throwable object.
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||