util
Class LoggerTest

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertySyslog
          extended by util.LoggerTest
All Implemented Interfaces:
Cloneable, Remote, Initializable, PropertyBearing, SyslogAdjusting

public class LoggerTest
extends PropertySyslog

A class to test protomatter syslog facilities. It is constructed with a properties file that is piped to PropertySyslog.scanProperties(java.util.Map) to construct sysloggers. The KEY_FREQUENCY points to the time in ms that elapses between calls to the logger. The five log-levels are traversed in equal steps, starting with DEBUG.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private static long DEFFREQUENCY
          The default log-message frequency.
static String KEY_FREQUENCY
          The key that controlls the log-message frequency.
private  int level
          The current log level.
private  Timer step
          The timer associated with the logger.
 
Fields inherited from class util.PropertySyslog
APPEND, BCC, CC, CHANNELSHOW, CHANNELWIDTH, CLASSWIDTH, DATECACHE, DATEFORMAT, EXTENSION, FACILITY, FLUSH, HOSTSHOW, HOSTWIDTH, KEY_DATAGRAMLOG, KEY_FILELOG, KEY_MAILLOG, KEY_PRINTWRITERLOG, KEY_REMOTELOG, KEY_TIMEROLLOVERLOG, LEVEL, NAME, NAMEFORMAT, PORT, ROLL, THREADSHOW, THREADWIDTH, TO
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
LoggerTest(Map<String,String> prop)
          Constructs and start the logger test.
 
Method Summary
static void main(String[] arg)
          Constructs the logger tester out of the properties supplied in the command line.
 
Methods inherited from class util.PropertySyslog
addLogger, addSysloggers, addThreadLogging, defaultLogging, disableLogging, enableLogging, getAllLoggers, getLoggerPolicy, removeAllLoggers, removeLogger, scanProperties, setAllLogLevel, setLoggerPolicy
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, init, isNew, keyCreate, keyCreate, parseObject, reload, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_FREQUENCY

public static final String KEY_FREQUENCY
The key that controlls the log-message frequency.

See Also:
Constant Field Values

DEFFREQUENCY

private static final long DEFFREQUENCY
The default log-message frequency.

See Also:
Constant Field Values

step

private Timer step
The timer associated with the logger.


level

private int level
The current log level.

Constructor Detail

LoggerTest

public LoggerTest(Map<String,String> prop)
Constructs and start the logger test. From the properties handed over, the loggers are constructed using the PropertySyslog.scanProperties(java.util.Map) method. Log messages are produced at equal KEY_FREQUENCY time intervalls.

Method Detail

main

public static void main(String[] arg)
                 throws Exception
Constructs the logger tester out of the properties supplied in the command line.

Throws:
Exception