Sovereign node logging system for WayrApp platform.
This module provides a centralized, environment-aware logging solution built on Winston.
It automatically adapts to serverless environments (Vercel, AWS Lambda, Netlify) by disabling
file-based logging while maintaining console output. In traditional server environments,
it provides both console and file-based logging with automatic log directory creation.
The logger supports multiple log levels (error, warn, info, http, debug) with colorized
console output and structured JSON file logging.
// Environment-specific behavior // In serverless environments (Vercel, Lambda, Netlify): // - Only console logging is active // - No file system operations // - Structured JSON format for log aggregation
// In traditional server environments: // - Console + file logging active // - Automatic logs/ directory creation // - Separate error.log and combined.log files
logger.debug('This appears only when LOG_LEVEL=debug'); logger.info('This appears when LOG_LEVEL=info or debug'); logger.error('This always appears unless LOG_LEVEL is disabled');
Sovereign node logging system for WayrApp platform.
This module provides a centralized, environment-aware logging solution built on Winston. It automatically adapts to serverless environments (Vercel, AWS Lambda, Netlify) by disabling file-based logging while maintaining console output. In traditional server environments, it provides both console and file-based logging with automatic log directory creation. The logger supports multiple log levels (error, warn, info, http, debug) with colorized console output and structured JSON file logging.
Author
Exequiel Trujillo
Since
1.0.0
Example
Example
Example