|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcz.cuni.amis.pogamut.base.utils.logging.LogPublisher
public abstract class LogPublisher

Implementation for the ILogPublisher interface that contains a Formatter for the LogRecords.
As default SimpleFormatter from the java.logging API is used.
Contains two default implementations ConsolePublisher and FilePublisher.
| Nested Class Summary | |
|---|---|
static class |
LogPublisher.ConsolePublisher
|
static class |
LogPublisher.FilePublisher
|
| Field Summary | |
|---|---|
protected java.util.logging.Formatter |
formatter
|
| Constructor Summary | |
|---|---|
LogPublisher()
|
|
LogPublisher(java.util.logging.Formatter formatter)
|
|
LogPublisher(IAgentId name)
|
|
| Method Summary | |
|---|---|
abstract void |
close()
From JavaDoc API: |
abstract void |
flush()
From JavaDoc API: |
java.util.logging.Formatter |
getFormatter()
|
void |
publish(java.util.logging.LogRecord record)
From JavaDoc API: |
abstract void |
publish(java.util.logging.LogRecord record,
java.lang.String formattedMsg)
|
void |
setFormatter(java.util.logging.Formatter formatter)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.logging.Formatter formatter
| Constructor Detail |
|---|
public LogPublisher()
public LogPublisher(IAgentId name)
public LogPublisher(java.util.logging.Formatter formatter)
| Method Detail |
|---|
public java.util.logging.Formatter getFormatter()
public void setFormatter(java.util.logging.Formatter formatter)
public abstract void close()
throws java.lang.SecurityException
ILogPublisherClose 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.
close in interface ILogPublisherjava.lang.SecurityException - if a security manager exists and if
the caller does not have LoggingPermission("control").public abstract void flush()
ILogPublisherFlush any buffered output.
flush in interface ILogPublisher
public abstract void publish(java.util.logging.LogRecord record,
java.lang.String formattedMsg)
public void publish(java.util.logging.LogRecord record)
ILogPublisherPublish 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.
publish in interface ILogPublisherrecord - description of the log event. A null record is
silently ignored and is not published
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||