Module

x/logger/mod.ts>default

logger for deno
Latest
class default
import { default } from "https://dotland.deno.dev/x/logger@v1.1.7/mod.ts";

Logger class

Properties

private
optional
dir: string
private
encoder: TextEncoder
private
rotate: boolean
private
stdout
private
optional
writer: Writer

Methods

private
format(...args: unknown[]): Uint8Array
private
getDate(): string
private
getError(): string
private
getInfo(): string
private
getNow(): string
private
getWarn(): string
private
write(unnamed 0: LoggerWriteOptions): Promise<void>
disable(type?: "info" | "warn" | "error"): void

disable a specific type of logger

Disable console logger

disableFile(): void

Disable file logger

enable(type?: "info" | "warn" | "error"): void

Enable a specific type of logger

Enable console logger

enableFile(): void

Enable file logger

error(...args: unknown[]): Promise<void>

Log message with error level

info(...args: unknown[]): Promise<void>

Log message with info level

initFileLogger(dir: string, options?: fileLoggerOptions): Promise<void>

init file logger

warn(...args: unknown[]): Promise<void>

Log message with warning level