|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object | +--com.protomatter.syslog.BasicLogger
A base class for Syslogger implementations.
This class provides common functions for setting
the date format for log entries and for formatting dates.
The default policy used by this logger is the
SimpleLogPolicy policy. The
default text formatter is the
SimpleSyslogTextFormatter
formatter. If this class is used in JDK 1.4, the
defauly text formatter is the
JDK14SyslogTextFormatter.
XML configuration class| Field Summary | |
protected SyslogTextFormatter |
formatter
|
protected LogPolicy |
policy
|
protected LogPolicy |
realPolicy
|
| Constructor Summary | |
BasicLogger()
The default constructor -- configure() will need to be called. |
|
| Method Summary | |
protected void |
formatLogEntry(java.lang.StringBuffer b,
SyslogMessage message)
Format the log entry using the current log formatter. |
java.lang.String |
getName()
Get this logger's name. |
LogPolicy |
getPolicy()
Get the log policy used by this logger. |
SyslogTextFormatter |
getTextFormatter()
Get the log formatter object used by this logger. |
boolean |
isSuspended()
Determine if this logger is suspended or not. |
boolean |
mightLog(java.lang.Object logger,
int level,
java.lang.String channel)
Determine if it's likely that a message from the given logger at the given level on the given channel will be paid attention to. |
protected void |
resetDateFormat()
Reset the text formatter's date format. |
void |
resume()
Resume operations with this logger. |
void |
setName(java.lang.String name)
Set this logger's name. |
void |
setPolicy(LogPolicy policy)
Set the log policy used by this logger. |
void |
setTextFormatter(SyslogTextFormatter formatter)
Set the log formatter object used by this logger. |
protected boolean |
shouldLog(SyslogMessage message)
A utility method to see if the current log policy says we should pay attention to this message. |
void |
suspend()
Suspend the operation of this logger. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.protomatter.syslog.Syslogger |
flush, log, shutdown |
| Field Detail |
protected LogPolicy policy
protected LogPolicy realPolicy
protected SyslogTextFormatter formatter
| Constructor Detail |
public BasicLogger()
| Method Detail |
public void suspend()
public void resume()
public boolean isSuspended()
public void setPolicy(LogPolicy policy)
public LogPolicy getPolicy()
public boolean mightLog(java.lang.Object logger,
int level,
java.lang.String channel)
LogPolicypublic void setTextFormatter(SyslogTextFormatter formatter)
setTextFormatter in interface Sysloggerpublic SyslogTextFormatter getTextFormatter()
getTextFormatter in interface Sysloggerprotected boolean shouldLog(SyslogMessage message)
protected void formatLogEntry(java.lang.StringBuffer b,
SyslogMessage message)
SimpleSyslogTextFormatterprotected void resetDateFormat()
SyslogTextFormatterpublic void setName(java.lang.String name)
public java.lang.String getName()
|
Protomatter Classes v1.1.6 Copyright 1998-2001 Nate Sammons |
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
| Protomatter Classes v1.1.6 | http://protomatter.sourceforge.net/1.1.6 |