install<>(logger: Logger<CustomLevels, UseOnlyCustomLevels>,options?: PinoSinkOptions,): void
Automatically configures LogTape to route all logs to a Pino logger.
This is a convenience function that automatically sets up LogTape to forward all log records to a Pino logger instance.
Basic auto-configuration
Basic auto-configuration
import pino from "pino"; import { install } from "@logtape/adaptor-pino"; const pinoLogger = pino(); // Automatically route all LogTape logs to the Pino logger install(pinoLogger); // Now any LogTape-enabled library will log through Pino import { getLogger } from "@logtape/logtape"; const logger = getLogger("my-app"); logger.info("This will be logged through Pino");
logger: Logger<CustomLevels, UseOnlyCustomLevels>
The Pino logger instance to forward logs to.
optional
options: PinoSinkOptions
Configuration options for the sink adapter.