Caplin Trader 4.8.0

Module: caplin/core/log/StoreLogger

Methods

(inner) addListener() → {Number}

Returns:
The number of log messages stored.
Type
Number

(inner) clear()

Clears all log records that have been stored in this StoreLogger.

(inner) dump() → {String}

Provides all of the stored log information as a string.
Returns:
a string containing all the logged records.
Type
String

(inner) getAllLogRecords() → {Array}

Provides all of the stored log information.
Returns:
Type
Array

(inner) getLogRecord(n) → {module:caplin/core/log/LogRecord}

Retrieves a stored log record.
Parameters:
Name Type Description
n Number the index of the log record to be retrieved.
Returns:
the nth oldest LogRecord (0 indexed) or undefined if n refers to a log record that hasn't been stored.
Type
module:caplin/core/log/LogRecord

(inner) getSize() → {Number}

Returns:
The number of log messages stored.
Type
Number

(inner) log(level, logData)

Stores the time and all the log information internally.
Parameters:
Name Type Description
level String the name of the method that was called.
logData Array the log information.

(inner) register(classPatternopt)

Registers this logger as a module:caplin/core/log/LogStoreService with the ServiceRegistry and as a module:caplin/core/log/Logger with the EventHub (to receive log messages).
Parameters:
Name Type Attributes Description
classPattern String <optional>
a pattern to restrict which messages the logger receives.

(inner) removeListener() → {Number}

Returns:
The number of log messages stored.
Type
Number