A logger for the Webpack ecosystem, currently at version 3.0.2. This library provides a simple logging API with configurable log levels (trace, debug, info, warn, error, silent), support for timestamps, and unique logger instances to avoid collisions in the Webpack multi-plugin environment. Version 3.0.0 was a complete rewrite, replacing ansi-colors with chalk and uuid with nanoid. It requires Node 8.0.0+. The project is actively maintained with a focus on Webpack plugin and loader development.
npm install webpack-logVerified import paths — ran on the pinned version, not inferred.
Creates a logger instance with name 'my-plugin', level 'info', and timestamps enabled, then logs messages at various levels.
Remove the `colors` option from logger configuration. If you need custom colors, fork the package or use `chalk` manually.
Access color formatting through `chalk` instead of `log.colors`.
In v2 and below, use `unique: true` to avoid sharing loggers. In v3, unique defaults to true, so no change needed.
Change `const { getLogger } = require('webpack-log')` to `const getLogger = require('webpack-log')`.Add `name` to the options: `getLogger({ name: 'my-logger' })`.Run `npm install webpack-log --save-dev` (or `--save` if not dev dependency).