Syslog White Paper FAQ Examples JavaDoc Classloader
Protomatter Software v1.1.7

com.protomatter.syslog
Class PerChannelPolicy.PolicyGroup

java.lang.Object
  |
  +--com.protomatter.syslog.SimpleLogPolicy
        |
        +--com.protomatter.syslog.PerChannelPolicy.PolicyGroup
All Implemented Interfaces:
LogPolicy
Enclosing class:
PerChannelPolicy

public static class PerChannelPolicy.PolicyGroup
extends SimpleLogPolicy

A policy within a policy -- this is exactly like the SimpleLogPolicy except that it also checks to see if the channel issuing the log message is in some set.

See Also:
PerChannelPolicy

Constructor Summary
PerChannelPolicy.PolicyGroup()
          Default constructor.
 
Method Summary
 void addChannelName(java.lang.String channelname)
          Add a channelname to the set of channel names we're listening to.
 void addChannelPattern(java.lang.String channelname)
          Add a channelname to the set of channel name patterns we're listening to.
 void clearChannelSet()
          Clear out the set of channel names we're listing to.
 void clearPatternSet()
          Clear out the set of channel name patterns we're listing to.
 java.util.Iterator getChannelSet()
          Get the set of channel names (exact matches) we're listing to.
 java.util.Iterator getPatternSet()
          Get the set of channel patterns we're listing to.
 void removeChannelName(java.lang.String channelname)
          Remove a channel name from the set of channel names we're listening to.
 void removeChannelPattern(java.lang.String channelname)
          Remove a channel name pattern from the set of channel name patterns we're listening to.
 boolean shouldLog(SyslogMessage m)
          Determine if the given message should be logged.
 
Methods inherited from class com.protomatter.syslog.SimpleLogPolicy
addChannel, getChannels, getLogMask, getName, inMask, removeAllChannels, removeChannel, setChannels, setChannels, setLogMask, setLogMask, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerChannelPolicy.PolicyGroup

public PerChannelPolicy.PolicyGroup()
Default constructor.
Method Detail

getChannelSet

public java.util.Iterator getChannelSet()
Get the set of channel names (exact matches) we're listing to.

clearChannelSet

public void clearChannelSet()
Clear out the set of channel names we're listing to.

addChannelName

public void addChannelName(java.lang.String channelname)
Add a channelname to the set of channel names we're listening to.

removeChannelName

public void removeChannelName(java.lang.String channelname)
Remove a channel name from the set of channel names we're listening to.

getPatternSet

public java.util.Iterator getPatternSet()
Get the set of channel patterns we're listing to.

clearPatternSet

public void clearPatternSet()
Clear out the set of channel name patterns we're listing to.

addChannelPattern

public void addChannelPattern(java.lang.String channelname)
Add a channelname to the set of channel name patterns we're listening to.

removeChannelPattern

public void removeChannelPattern(java.lang.String channelname)
Remove a channel name pattern from the set of channel name patterns we're listening to.

shouldLog

public boolean shouldLog(SyslogMessage m)
Determine if the given message should be logged. The message severity and channel are first checked by our superclass, then we see if the logger channel name is in our set.
Overrides:
shouldLog in class SimpleLogPolicy

Protomatter Software v1.1.7
Copyright 1998-2002 Nate Sammons

Protomatter Software v1.1.7 http://protomatter.sourceforge.net/1.1.7