Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dxx/src/lib/$shared.ts>$logger.Logger

🚀 (Deno) enhanced executor
Latest
class $logger.Logger
extends TransformWriter<LoggerInT, O>
import { $logger } from "https://deno.land/x/dxx@rf/src/lib/$shared.ts";
const { Logger } = $logger;

Logger. This is what we write to.

Examples

Creation

// Via class
import { Logger } from 'caterpillar'
const logger = new Logger()

Constructors

new
Logger(fn?: TransformInContextFn<LoggerInT, O>, options?: LoggerOptions)

Create our instance and apply our configuration options.

Methods

chain<T>(t: TransformWriter<O, T>): Logger<T>
debug(...args: unknown[])

Alias for log() which prefixes the debug log level.

error(...args: unknown[])

Alias for log() which prefixes the 'error' log level.

info(...args: unknown[])

Alias for log() which prefixes the info log level.

log(...args: unknown[])

Log the arguments into the logger transform stream.

logLevelDetail(value?: number | string)

Alias for logLevelDetail using the configured logger levels.

note(...args: unknown[])

Alias for log() which prefixes the info log level.

trace(...args: unknown[])

Alias for log() which prefixes the trace log level.

warn(...args: unknown[])

Alias for log() which prefixes the warn log level.

warning(...args: unknown[])

(Another common) alias for log() which prefixes the warn log level.

Static Methods

LoggerTransformFn(context_: unknown | null, args_: unknown | unknown[]): LogEntry | undefined

Takes an arguments array and transforms it into a log entry.