@wolfstar/logger
v2.1.9
Published
DEPRECATED: use @wolfstar/plugin-logger instead. A lightweight logger system with level support
Maintainers
Readme
@wolfstar/logger
A lightweight logger system with level-based filtering and coloured output.
[!WARNING] This package is deprecated. It will be replaced by
@wolfstar/plugin-logger, a future official plugin living inwolfstar-project/plugins. The new package does not exist yet — only a proposed issue does — so there is nothing to migrate to today; see Migration below for details.
Description
A lightweight logger system with level support.
Features
- Logging integration similar to @sapphire/plugin-logger.
- Log levels
- Colorette powered Colours
- Timestamps
- Logging similar to framework (registering commands, errors, successes, etc)
Usage
import { Logger } from '@wolfstar/logger';
const logger = new Logger();
logger.info('Hello world');
// [2022/08/04-13:28:58] INFO (19284): Hello World
logger.info('Hello, %s', 'Wolfstar');
// [2022/08/04-13:29:46] INFO (19284): Hello, WolfstarFor ease of use, @wolfstar/logger re-exports all the functions from colorette.
Migration
@wolfstar/logger is deprecated in favour of the future @wolfstar/plugin-logger, which will live in the
wolfstar-project/plugins repository alongside the other
@wolfstar/plugin-* packages. It is not implemented yet — at this stage only a proposed issue exists in that
repository — so there is no package to install and no migration steps to follow today.
The plan for @wolfstar/plugin-logger is to offer interchangeable adapters/backends (evlog, consola,
winston) behind pluggable transports, with optional Sentry integration, while keeping an API compatible in
style with the current Logger class (trace/debug/info/warn/error/fatal).
In the meantime, @wolfstar/logger remains fully functional and will not be removed until the migration
path to @wolfstar/plugin-logger is ready. This README will be updated with concrete migration steps once that
package is published.
