com.ibm.websphere.als
Class FileLoggerjava.lang.Object | +--com.ibm.websphere.als.FileLogger
- All Implemented Interfaces:
- Logger
- public class FileLogger
- extends java.lang.Object
- implements Logger
This class implements Logger interface for file persistence. It writes LogRecords into a file formatted as following:
If a field is null, a dash (-) will be written in that position. See DatabaseLogger class for definition of the fields.
- See Also:
- DatabaseLogger
Constructor Summary FileLogger(java.io.PrintStream ps)
Constructs a file-base Logger.
Method Summary java.lang.Object getStorageSource()
Returns my storage source -- a PrintStreamvoid write(LogRecord[] data)
Writes the data to the presistent medium.
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail FileLogger
public FileLogger(java.io.PrintStream ps)
- Constructs a file-base Logger.
- Parameters:
- ps - - a PrintStream. If this stream is the System.out and the calling webapp defines Standard Output file (see WAS Admin Console), the output will go to the webapp's Standard Output file.
Method Detail write
public void write(LogRecord[] data) throws java.lang.Exception
- Writes the data to the presistent medium.
- Parameters:
- data - array of LogRecords
- Throws:
- java.lang.Exception - when unable to write to storage
getStorageSource
public java.lang.Object getStorageSource()
- Returns my storage source -- a PrintStream
- Specified by:
- getStorageSource in interface Logger
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.