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

x/pup/lib/core/logger.ts>Logger

Universal process manager built in Deno
Go to Latest
class Logger
import { Logger } from "https://deno.land/x/pup@1.0.0-rc.7/lib/core/logger.ts";

Constructors

new
Logger(globalConfiguration: GlobalLoggerConfiguration, storeName?: string)

Properties

private
optional
attachedLogger: AttachedLogger
private
optional
storeName: string

Methods

private
fetchLogsFromStore(selector: { prefix: Deno.KvKey; } | { start: Deno.KvKey; end: Deno.KvKey; }, nRows?: number): Promise<LogEventData[]>
private
internalLog(
severity: string,
category: string,
text: string,
timeStamp?: number,
)
private
prepareSelector(
processId?: string,
startTimeStamp?: number,
endTimeStamp?: number,
): { prefix: Deno.KvKey; } | { start: Deno.KvKey; end: Deno.KvKey; }
private
writeFile(
fileName: string,
text: string,
quiet?,
)
attach(pluginLogger: AttachedLogger)
error(
category: string,
text: string,
timestamp?: number,
)
generic(
severity: string,
category: string,
text: string,
timestamp?: number,
)
getLogContents(
processId?: string,
startTimeStamp?: number,
endTimeStamp?: number,
nRows?: number,
): Promise<LogEventData[]>
getLogsByProcess(processId: string, nRows?: number): Promise<LogEventData[]>
getLogsByProcessAndTime(
processId: string,
startTimeStamp: number,
endTimeStamp: number,
nRows?: number,
): Promise<LogEventData[]>
getLogsByTime(
startTimeStamp: number,
endTimeStamp: number,
nRows?: number,
): Promise<LogEventData[]>
info(
category: string,
text: string,
timestamp?: number,
)
log(
category: string,
text: string,
timestamp?: number,
)
purge(keepHours: number): Promise<number>
warn(
category: string,
text: string,
timestamp?: number,
)