@logmanager/package-pino
v1.0.1
Published
Use @logmanager together with pino (or as a replacement to pino).
Downloads
3
Maintainers
Readme
@logmanager/package-pino
Use @logmanager together with pino (or as a replacement to pino).
Contains two parts:
Pino Logger
import { LogManager, LogLevel } from "@logmanager/core"
import { PinoLogger } from "@logmanager/package-pino"
import Pino from "pino"
const pino = Pino()
const logManager = new LogManager(new PinoLogger(pino), LogLevel.VERBOSE)
this uses a existing pino logger as a log target.
Pino Imitator
import { LogManager, LogLevel } from "@logmanager/core"
import { ConsoleLogger } from "@logmanager/package-console"
import { fromLogManager } from "@logmanager/package-pino"
const logManager = new LogManager(new ConsoleLogger(), LogLevel.VERBOSE);
const pino = fromLogManager(logManager);
this uses a existing log manager and creates a "pino" instance that aims to be fully api-compatible with pino.