Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class DateFileHandler
extends WriterHandler
import { DateFileHandler } from "https://deno.land/x/date_file_log@v0.2.5/src/date_file.ts";

Constructors

new
DateFileHandler(levelName: LevelName, options: FileHandlerOptions)

Properties

private
initingPromise: Promise<void> | undefined
private
originFileName: string
protected
_buf: BufWriterSync
protected
_daysToKeep: number
protected
_encoder: TextEncoder
protected
_file: Deno.File | undefined
protected
_flushTimeout: number
protected
_mode: LogMode
protected
_openOptions: Deno.OpenOptions
protected
_pattern: string
protected
tomorrowDay: number

Methods

private
_log(msg: string): void
private
getFilenameByDate(filename: string, date?): string
private
init()
private
setupBuf()
flush(): void
handle(logRecord: LogRecord): void
log(msg: string): void