Skip to main content
Module

x/tl_log/mod.ts>Log

Time-Level-Log for Deno🦕
Latest
class Log
import { Log } from "https://deno.land/x/tl_log@0.1.2/mod.ts";

Timestamp-Level-Log for Deno.

Constructors

new
Log(unnamed 0?: { minLogLevel?: LogLevel; levelIndicator?:
| "none"
| "full"
| "initial"
| "symbol"
; datetimeFormat?: string; addNewLine?: boolean; color?: boolean; }
)

Log constructor.

Properties

private
color: boolean
private
datetimeFormat: string
private
levelSign: (logLevel: LogLevel) => string
private
suffix: string[]

Methods

private
output(
date: Date,
logLevel: LogLevel,
args: unknown[],
)
private
prefix(date: Date, logLevel: LogLevel)
debug(...args: unknown[])

Output debug level log with timestamp and level indicator.

error(...args: unknown[])

Output error level log with timestamp and level indicator.

info(...args: unknown[])

Output info level log with timestamp and level indicator.

warn(...args: unknown[])

Output warn level log with timestamp and level indicator.