Skip to main content

logger package

A levelled console logger for Node.js applications and libraries.

Remarks​

The package exports the Logger class, which writes messages to the console from a given log level, and the types of its options. Create a logger with a level, then call its logging methods (error(), warn(), info(), verbose(), debug(), and trace()); a message is written only if the level of the logger is equal to or higher than that of the method.

The package is an ES module, and has no runtime dependencies.

Classes​

Class

Description

Logger

The Logger class implements the logger functionality.

Interfaces​

Interface

Description

LoggerBufferRecord

Deprecated type of a record stored in the internal buffer.

LoggerNumericLevels

The numeric levels of the log level names.

LoggerParams

The options of the Logger constructor.

Type Aliases​

Type Alias

Description

LoggerArguments

The arguments of the Logger constructor.

LoggerConsole

Type of the console objects accepted by the logger.

LoggerFunction

Type of the function that writes a message.

LogLevel

Type of the strings recognised as valid level names.

NumericLogLevel

Type of the numeric log level.


Generated via tsdoc2docusaurus 1.3.2 by API Extractor/Documenter 7.60.1.