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

std/log/handlers.ts>FileHandler

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class FileHandler
extends WriterHandler
import { FileHandler } from "https://deno.land/std@0.63.0/log/handlers.ts";

Constructors

new
FileHandler(levelName: LevelName, options: FileHandlerOptions)

Properties

protected
_buf: BufWriterSync
protected
_encoder: TextEncoder
protected
_file: Deno.File | undefined
protected
_filename: string
protected
_mode: LogMode
protected
_openOptions: Deno.OpenOptions

Methods

destroy(): Promise<void>
flush(): void
handle(logRecord: LogRecord): void
log(msg: string): void
setup(): Promise<void>