|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jalore.log4j.Log4JFileReader
public class Log4JFileReader
Implementation of LogReader using a log4j file.
This reader sets the property Log4JProperties.FILE_NAME with the log file name in each log message found.
It is useful to have a track of the origin of each message when using MultiLogReader.
| Constructor Summary | |
|---|---|
Log4JFileReader(java.io.File logFile,
java.lang.String log4jPattern)
Constructs a Log4JFileReader. |
|
| Method Summary | |
|---|---|
java.util.Set<java.lang.String> |
getPropertyNames()
Returns the list of property names that will be available in read log messages. |
boolean |
hasMoreMessages()
Tests if this reader contains more log messages. |
LogMessage |
nextMessage()
Returns the next log message of this reader or null if no more message is available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Log4JFileReader(java.io.File logFile,
java.lang.String log4jPattern)
throws java.io.IOException
The given pattern is a log4j type pattern. It must only describe the first line of log messages or the beginning of this line.
logFile - the log filelog4jPattern - log4j type pattern describing first line of messages
java.io.IOException - if an error occurred while reading the log file| Method Detail |
|---|
public boolean hasMoreMessages()
LogReader
hasMoreMessages in interface LogReadertrue if and only if this reader
contains at least one more log message to provide;
false otherwise.
public LogMessage nextMessage()
throws java.io.IOException
LogReader
nextMessage in interface LogReaderjava.io.IOException - if an error occurred while reading the next messagepublic java.util.Set<java.lang.String> getPropertyNames()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||