purpleteam-logger is a customizable logging library built on winston, designed to provide enhanced logging capabilities for PurpleTeam security projects.
Logging component of OWASP PurpleTeam
This tool is primarily used by developers and security professionals working within the PurpleTeam ecosystem to implement consistent, extensible logging across security automation and SIEM tools. It facilitates log analysis and debugging by providing reusable loggers with customizable transports and formats tailored for both development and production environments.
The logger automatically adapts its output format based on the NODE_ENV environment variable, providing timestamped logs in production and simpler output in development. Users can extend the logger with additional transports beyond the default console transport. It is recommended to validate log levels against syslog standards to ensure consistency.
npm install purpleteam-logger
import { init as initLogger } from 'purpleteam-logger';
Imports the logger initialization function from purpleteam-logger.
const log = initLogger({ level: 'debug' });
Creates or retrieves a reusable logger instance with debug level logging.