Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
class DateFileHandler
extends WriterHandler
import { DateFileHandler } from "https://deno.land/x/date_file_log@v0.5.0/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.FsFile | 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