|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.protomatter.syslog.SimpleLogPolicy
The default LogPolicy that knows about log levels and channels.
LogPolicy
,
XML configuration class
Constructor Summary | |
SimpleLogPolicy()
All channels are listened to by default, and the default log mask is inherited from Syslog itself. |
Method Summary | |
void |
addChannel(java.lang.String channel)
Add the given channel to the list of channels we are listening to. |
java.util.Iterator |
getChannels()
Get the list of channels this policy listens to. |
int |
getLogMask()
Get the mask for logging of messages. |
java.lang.String |
getName()
Get the name of this policy. |
protected boolean |
inMask(int level,
int mask)
Check if the given level is covered by the given mask. |
void |
removeAllChannels()
Remove all channels from the list of channels we are listening to. |
void |
removeChannel(java.lang.String channel)
Remove the given channel from the list of channels we are listening to. |
void |
setChannels(java.util.List channels)
Set the list of channels to use. |
void |
setChannels(java.util.Set channelSet)
Set the list of channels to use. |
void |
setLogMask(int mask)
Set the mask for logging of messages. |
void |
setLogMask(java.lang.String mask)
Set the log mask. |
void |
setName(java.lang.String name)
Set the name of this policy. |
boolean |
shouldLog(SyslogMessage message)
Determine if a log message should be logged given the information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleLogPolicy()
Method Detail |
public java.lang.String getName()
getName
in interface LogPolicy
public void setName(java.lang.String name)
setName
in interface LogPolicy
public void setChannels(java.util.List channels)
public void setChannels(java.util.Set channelSet)
public void addChannel(java.lang.String channel)
public void removeChannel(java.lang.String channel)
public void removeAllChannels()
public java.util.Iterator getChannels()
public boolean shouldLog(SyslogMessage message)
shouldLog
in interface LogPolicy
protected final boolean inMask(int level, int mask)
public final void setLogMask(java.lang.String mask)
Syslog.parseLogMask(java.lang.String)
public final void setLogMask(int mask)
public final int getLogMask()
|
Protomatter Software v1.1.7 Copyright 1998-2002 Nate Sammons |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Protomatter Software v1.1.7 | http://protomatter.sourceforge.net/1.1.7 |