public class FileLogger extends DisplayLogger
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
java.lang.String |
mLogFileName
The name of the log file.
|
java.io.File |
mLogFilePath
The file path to the log file (filename not included).
|
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
FileLogger()
Constructs a FileLogger.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the log media cleanly (if applicable).
|
void |
doStartService()
This is called after the service has been created, added to the
Registry, and configured.
|
void |
doStopService()
This is called when the service is to be stopped.
|
void |
flush()
Flushes the log media (if applicable).
|
java.lang.String |
getLogFileName()
Returns the name of the log file.
|
java.io.File |
getLogFilePath()
Returns the complete path to the log file (filename not
included).
|
void |
open()
Opens the log media for writing to (if applicable).
|
void |
setLogFileName(java.lang.String pLogFileName)
Sets the name of the log file.
|
void |
setLogFilePath(java.io.File pLogFilePath)
Sets the complete path to the log file (filename not included).
|
generateCroppedStackTrace, getLoggingEnabled, getLogStream, getMaxLinesInStackTrace, getPrefixLogStream, getPrintStackTrace, getWrittenEventCount, isCropStackTrace, isPrefixEachLine, isPrefixEachMessage, isSuppressTimestamp, logEvent, setCropStackTrace, setLoggingEnabled, setLogStream, setMaxLinesInStackTrace, setPrefixEachLine, setPrefixEachMessage, setPrefixLogStream, setPrintStackTrace, setSuppressTimestamp, writeLogEventaddLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public java.lang.String mLogFileName
public java.io.File mLogFilePath
public void setLogFileName(java.lang.String pLogFileName)
pLogFileName - the log file namepublic void setLogFilePath(java.io.File pLogFilePath)
pLogFilePath - the log file pathpublic java.lang.String getLogFileName()
public java.io.File getLogFilePath()
public void doStartService()
throws ServiceException
doStartService in class GenericServiceServiceException - if an error occurred during the operationpublic void doStopService()
throws ServiceException
doStopService in class GenericServiceServiceException - if an error occurred during the operationpublic void open()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic void flush()
throws java.io.IOException
java.io.IOException