Class: Logger

Logger

Creates a new Logger instance

Name Type Default Description
className string

The Class name associated with the logging instance

options object null optional

Optional settings.

Name Type Default Description
logger function null optional

Custom logger function;

loggerLevel string error optional

Override default global log level.

Returns:
Logger instance.

Methods

Log a message at the debug level

Name Type Description
message string

The message to log

object object

additional meta data to log

Log a message at the error level

Name Type Description
message string

The message to log

object object

additional meta data to log

Log a message at the info level

Name Type Description
message string

The message to log

object object

additional meta data to log

Is the logger set at debug level

Is the logger set at error level

Is the logger set at info level

Is the logger set at error level

staticLogger.currentLogger(){function}

Get the current logger function

staticLogger.filter(type, values){null}

Set what classes to log.

Name Type Description
type string

The type of filter (currently only class)

values Array.<string>

The filters to apply

Resets the logger to default settings, error and no filtered classes

staticLogger.setCurrentLogger(logger){null}

Set the current logger function

Name Type Description
logger function

Logger function.

staticLogger.setLevel(level){null}

Set the current log level

Name Type Description
level string

Set current log level (debug, info, error)

comments powered by Disqus