Pino β
Pino is a fast and lightweight JSON logger designed for both development and production environments. It offers structured logging with advanced features for enhanced debugging and monitoring.
The pinoMedicusPlugin allows you to integrate Pino into Medicus, providing structured logging for both errors and unhealthy status events.
import { } from 'medicus';
import { } from 'medicus/pino';
import { } from 'pino';
const = ();
// Configure Medicus to use Pino for logging
const = new ({
: [()]
});What Gets Logged β
The Pino plugin automatically configures both logging functions:
Error Logger β
When a health checker throws an error, it will be logged using pino.error() with the error object and checker name.
Unhealthy Logger β
When a health check completes with a DEGRADED or UNHEALTHY status, it will be logged using pino.fatal() with all service details and the overall system status.
This integration ensures that all errors and health status changes produced by Medicus are formatted and processed using Pinoβs structured logging.
For additional details about Pino, visit the Pino documentation.