Module

x/wmill/deps.ts>log.handlers

Open-source developer platform to turn scripts into workflows and UIs. Fastest workflow engine (5x vs Airflow). Open-source alternative to Airplane and Retool.
Go to Latest
variable log.handlers
import { log } from "https://dotland.deno.dev/x/wmill@v1.323.6/deps.ts";
const { handlers } = log;

Handlers are responsible for actual output of log messages. When a handler is called by a logger, it firstly checks that LogRecord's level is not lower than level of the handler. If level check passes, handlers formats log record into string and outputs it to target.

Custom handlers

Custom handlers can be implemented by subclassing {@link BaseHandler} or {@link WriterHandler}.

{@link BaseHandler} is bare-bones handler that has no output logic at all,

{@link WriterHandler} is an abstract class that supports any target with Writer interface.

During setup async hooks setup and destroy are called, you can use them to open and close file/HTTP connection or any other action you might need.

For examples check source code of {@link FileHandler}and {_@link_TestHandler`}.

type

{ BaseHandler; ConsoleHandler; WriterHandler; FileHandler; RotatingFileHandler; }