@ynode/ylog
v1.0.2
Published
Helper module for outputting colored info, warn, error, debug and trace/verbose log messages. Works with Fastify or standalone.
Readme
@ynode/ylog
Copyright (c) 2025 Michael Welter [email protected]
Helper module for outputting colored info, warn, error, debug and trace/verbose log messages. Works with Fastify or standalone Node.js application.
Installation
npm install @ynode/ylogBasic Usage
import ylog from "@ynode/ylog";
const log = ylog(import.meta);
log.info(`[${process.pid}] Hello`);
log.warn(`[${process.pid}] Hello`);
log.error(`[${process.pid}] Hello`);const fastify = Fastify({ loggerInstance: log });
fastify.log.info(`Worker ${process.pid} shutting down due to inactivity.`);