|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.talika.tarsis.service.AbstractService org.talika.tarsis.log.LoggerService org.talika.tarsis.log.FileLogger
public final class 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 Service
init
in class AbstractService
context
- 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 Service
destroy
in class AbstractService
Service.destroy()
public java.lang.String getName()
getName
in interface Service
getName
in class AbstractService
Service.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 LoggerService
level
- int log level.msg
- String message.protected void writeLog(int level, java.lang.String msg, java.lang.Throwable t)
writeLog
in class LoggerService
level
- 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 |