# Class ConsoleLogger

A class implementing a logger that outputs to the console.

#### Hierarchy (view full)

- LoggerBase
  - ConsoleLogger

#####
Index

### Constructors

constructor

### Properties

name

### Accessors

level

### Methods

_log
debug
error
fatal
info
log
trace
warn

##
Constructors

### constructor

- new ConsoleLogger(name, logManager): ConsoleLogger

- Initializes a new instance of the LoggerBase class.

  #### Parameters

  - name: string

    The name of the logger.

  - logManager: LogManager

    The log manager.

  #### Returns ConsoleLogger

  Inherited from LoggerBase.constructor

##
Properties

### `Readonly` name

name: string

The unique name of the logger.

Inherited from LoggerBase.name

##
Accessors

### level

- get level(): LogLevel

- The current log level of the logger. This acts as a filter for the logger's output. Only messages with a level equal or higher than this value will be written to the log.

  #### Returns LogLevel

  Inherited from LoggerBase.level

- set level(logLevel): void

- The current log level of the logger. This acts as a filter for the logger's output. Only messages with a level equal or higher than this value will be written to the log.

  #### Parameters

  - logLevel: LogLevel

  #### Returns void

  Inherited from LoggerBase.level

##
Methods

### `Protected`_log

- _log(entry): void

- Logs an entry.

  #### Parameters

  - entry: LogEntry

    The entry to write.

  #### Returns void

  Overrides LoggerBase._log

### debug

- debug(messageOrOptions, ...args): void

- Logs a message at level DEBUG.

  #### Parameters

  - messageOrOptions: string | LogOptions

    The message to log or the options.

  - `Rest`...args: unknown[]

    Arguments used for replacement tokens in the message.

  #### Returns void

  Inherited from LoggerBase.debug

### error

- error(messageOrOptions, ...args): void

- Logs a message at level ERROR.

  #### Parameters

  - messageOrOptions: string | LogOptions

    The message to log or the options.

  - `Rest`...args: unknown[]

    Arguments used for replacement tokens in the message.

  #### Returns void

  Inherited from LoggerBase.error

### fatal

- fatal(messageOrOptions, ...args): void

- Logs a message at level FATAL.

  #### Parameters

  - messageOrOptions: string | LogOptions

    The message to log or the options.

  - `Rest`...args: unknown[]

    Arguments used for replacement tokens in the message.

  #### Returns void

  Inherited from LoggerBase.fatal

### info

- info(messageOrOptions, ...args): void

- Logs a message at level INFO.

  #### Parameters

  - messageOrOptions: string | LogOptions

    The message to log or the options.

  - `Rest`...args: unknown[]

    Arguments used for replacement tokens in the message.

  #### Returns void

  Inherited from LoggerBase.info

### log

- log(level, messageOrOptions, ...args): void

- Logs a message at the given level.

  #### Parameters

  - level: LogLevel

    The log level.

  - messageOrOptions: string | LogOptions

    The message to log or the options.

  - `Rest`...args: unknown[]

    Arguments used for replacement tokens in the message.

  #### Returns void

  Inherited from LoggerBase.log

### trace

- trace(messageOrOptions, ...args): void

- Logs a message at level TRACE.

  #### Parameters

  - messageOrOptions: string | LogOptions

    The message to log or the options.

  - `Rest`...args: unknown[]

    Arguments used for replacement tokens in the message.

  #### Returns void

  Inherited from LoggerBase.trace

### warn

- warn(messageOrOptions, ...args): void

- Logs a message at level WARN.

  #### Parameters

  - messageOrOptions: string | LogOptions

    The message to log or the options.

  - `Rest`...args: unknown[]

    Arguments used for replacement tokens in the message.

  #### Returns void

  Inherited from LoggerBase.warn