Class
caplin.core.log

StoreLogger

A caplin.core.log.Logger that stores log messages into internal arrays. Currently grows forever, so it defaults its logging level to INFO.

Constructor Summary

Attributes Name and Description
caplin.core.log.StoreLogger( level)

Constructs a StoreLogger.

Method Summary

Attributes Name and Description
String dump()

Provides all of the stored log information as a string.

Array getLogRecords()

Provides all of the stored log information.

void log(String levelName, Array logData)

Stores the time and all the log information internally.

void register(String classPattern)

Registers this logger as a caplin.core.log.LogStoreService with the ServiceRegistry and as a caplin.core.log.Logger with the EventHub (to receive log messages).

Methods inherited from class caplin.core.log.AbstractLogger:
logDataToString, setLevel

Constructor Detail

caplin.core.log.StoreLogger( level)

Constructs a StoreLogger.

Parameters
level the most detailed level at which to output log messages. Should be one of the levels defined statically on caplin.core.log.AbstractLogger. Will default to INFO level if not provided.

Method Detail

String dump()

Provides all of the stored log information as a string.

Returns
a string containing all the logged records.

Array getLogRecords()

Provides all of the stored log information.

Returns
an array of caplin.core.log.LogRecords. Warning: this array is added to after being returned. Do not modify it.

void log(String levelName, Array logData)

Stores the time and all the log information internally.

Parameters
String levelName the name of the method that was called.
Array logData the log information.

void register(String classPattern)

Registers this logger as a caplin.core.log.LogStoreService with the ServiceRegistry and as a caplin.core.log.Logger with the EventHub (to receive log messages).

Parameters
String classPattern an optional pattern to restrict which messages the logger receives.