# Class LoggerBase`Abstract`

Base class for loggers.

#### Hierarchy (view full)

- LoggerBase
  - ConsoleLogger

#### Implements

- Logger

#####
Index

### Constructors

constructor

### Properties

name

### Accessors

level

### Methods

_log
debug
error
fatal
info
log
trace
warn

##
Constructors

### constructor

- new LoggerBase(name, logManager): LoggerBase

- Initializes a new instance of the LoggerBase class.

  #### Parameters

  - name: string

    The name of the logger.

  - logManager: LogManager

    The log manager.

  #### Returns LoggerBase

##
Properties

### `Readonly` name

name: string

The unique name of the logger.

Implementation of Logger.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

  Implementation of Logger.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

  Implementation of Logger.level

##
Methods

### `Protected` `Abstract`_log

- _log(entry): void

- Logs an entry.

  #### Parameters

  - entry: LogEntry

    The entry to write.

  #### Returns void

### 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

  Implementation of Logger.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

  Implementation of Logger.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

  Implementation of Logger.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

  Implementation of Logger.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

  Implementation of Logger.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

  Implementation of Logger.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

  Implementation of Logger.warn