Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/log/logger.ts>Logger

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class Logger
import { Logger } from "https://deno.land/std@0.219.1/log/logger.ts";

Constructors

new
Logger(
loggerName: string,
levelName: LevelName,
options?: LoggerOptions,
)

Properties

handlers: BaseHandler[]
level: LogLevel

Use this to retrieve the current numeric log level.

levelName: LevelName
readonly
loggerName: string

Methods

asString(data: unknown, isProperty?): string
critical<T>(msg: () => T, ...args: unknown[]): T | undefined
critical<T>(msg: T extends GenericFunction ? never : T, ...args: unknown[]): T
debug<T>(msg: () => T, ...args: unknown[]): T | undefined
debug<T>(msg: T extends GenericFunction ? never : T, ...args: unknown[]): T
error<T>(msg: () => T, ...args: unknown[]): T | undefined
error<T>(msg: T extends GenericFunction ? never : T, ...args: unknown[]): T
info<T>(msg: () => T, ...args: unknown[]): T | undefined
info<T>(msg: T extends GenericFunction ? never : T, ...args: unknown[]): T
warn<T>(msg: () => T, ...args: unknown[]): T | undefined
warn<T>(msg: T extends GenericFunction ? never : T, ...args: unknown[]): T