class Logger
implements ILogger

Console-based logger implementation for Deno

Constructors

new
Logger(options?: LoggerOptions)

Properties

protected
colors: boolean
protected
level: LogLevel
protected
module: string
protected
prefix: string
protected
timestamps: boolean

Methods

child(prefix: string): Logger

Creates a child logger with an additional prefix

debug(message: string): void

Logs a debug message

error(message: string): void

Logs an error message

private
format(
levelName: string,
color: string,
message: string,
): string

Formats a log message with optional prefix and timestamp

getModule(): string

Gets the module name for this logger

Gets the module overrides configuration

info(message: string): void

Logs an info message

private
resolveLogLevel(defaultLevel: LogLevel): LogLevel

Resolves the effective log level for this logger based on module overrides

setLevel(level: LogLevel): void

Sets the log level

success(message: string): void

Logs a success message (info level)

trace(message: string): void

Logs a trace message (most verbose)

warn(message: string): void

Logs a warning message