Module

x/drash/src/standard/log/AbstractLogger.ts>AbstractLogger

A microframework for building JavaScript HTTP applications. Runtime-agnostic. Strongly typed.
Latest
class AbstractLogger
implements Logger
Abstract
import { AbstractLogger } from "https://dotland.deno.dev/x/drash@v3.0.0-beta.2/src/standard/log/AbstractLogger.ts";

Base logger for logger classes.

Constructors

new
AbstractLogger(name: string, level: LogLevel)

Properties

protected
level: LogLevel

The highest level log message this logger can write.

protected
name: string

The name of this logger. Can be used when writing messsages.

Methods

protected
canLog(messageLevel: LogLevel): boolean

Can this logger log the given message level?

protected
getFormattedMessage(
level: string,
message: unknown,
replacements: unknown[],
): string
protected
getMessagePrefix(messageLevel: string): string

Get the prefix to write before the log message.

protected
abstract
write(...messages: unknown[]): unknown
debug(message: unknown, ...replacements: unknown[]): unknown
error(message: unknown, ...replacements: unknown[]): unknown
fatal(message: unknown, ...replacements: unknown[]): unknown
info(message: unknown, ...replacements: unknown[]): unknown
trace(message: unknown, ...replacements: unknown[]): unknown
warn(message: unknown, ...replacements: unknown[]): unknown