|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILogPublisher
Java logging API relies on handlers for publishing records, we have created one instance of this Handler (LogHandler instnace) and delegate abstract methods from Handler on the publisher interface.
Default implementation LogPublisher exists which is using Formatter to format the LogRecord - inside this LogPublisher you will find public static inner class with default implementation for publishing log records to Console or File (LogPublisher.ConsolePublisher and LogPublisher.FilePublisher classes).
Method Summary | |
---|---|
void |
close()
From JavaDoc API: |
void |
flush()
From JavaDoc API: |
void |
publish(java.util.logging.LogRecord record)
From JavaDoc API: |
Method Detail |
---|
void publish(java.util.logging.LogRecord record)
Publish a LogRecord.
The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.
The Handler is responsible for formatting the message, when and if necessary. The formatting should include localization.
record
- description of the log event. A null record is
silently ignored and is not publishedvoid flush()
Flush any buffered output.
void close() throws java.lang.SecurityException
Close the Handler and free all associated resources.
The close method will perform a flush and then close the Handler. After close has been called this Handler should no longer be used. Method calls may either be silently ignored or may throw runtime exceptions.
java.lang.SecurityException
- if a security manager exists and if
the caller does not have LoggingPermission("control").
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |