ShieldbowLogger class


Basic built-in debugging logger?.

Signature:

export declare class ShieldbowLogger implements ILogger 

Implements: ILogger

References: ILogger


Constructor

new ShieldbowLogger (level?: LogLevel)

Constructs a new instance of the ShieldbowLogger class.

Parameters:

ParameterTypeDescription
levelLogLevelThe logger's level.

Properties

level

The logger's level, only messages above or equal to this level will be logged.

Type: LoggerLevel


Methods

.critical ()

Log a message at the CRITICAL level.

Signature:

critical(...message: any[]): void;

Parameters:

ParameterTypeDescription
messageanyThe message to log.

Return type: void


.debug ()

Log a message at the DEBUG level.

Signature:

debug(...message: any[]): void;

Parameters:

ParameterTypeDescription
messageanyThe message to log.

Return type: void


.error ()

Log a message at the ERROR level.

Signature:

error(...message: any[]): void;

Parameters:

ParameterTypeDescription
messageanyThe message to log.

Return type: void


.hasLevel ()

Check whether a certain level is enabled.

Signature:

hasLevel(level: LoggerLevel): boolean;

Parameters:

ParameterTypeDescription
levelLoggerLevelThe level to check.

Return type: Boolean


.info ()

Log a message at the INFO level.

Signature:

info(...message: any[]): void;

Parameters:

ParameterTypeDescription
messageanyThe message to log.

Return type: void


.log ()

The base logging function.

Signature:

log(level: LoggerLevel, ...message: any[]): void;

Parameters:

ParameterTypeDescription
levelLoggerLevelThe level at which the message should be logged.
messageanyThe message to log.

Return type: void


.trace ()

Log a message at the TRACE level.

Signature:

trace(...message: any[]): void;

Parameters:

ParameterTypeDescription
messageanyThe message to log.

Return type: void


.warn ()

Log a message at the WARN level.

Signature:

warn(...message: any[]): void;

Parameters:

ParameterTypeDescription
messageanyThe message to log.

Return type: void