util
Class LoggerTest
java.lang.Object
util.PropertyContainer
util.PropertySyslog
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.
|
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 |
|
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 |
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.
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.
main
public static void main(String[] arg)
throws Exception
- Constructs the logger tester out of the properties supplied in the
command line.
- Throws:
Exception