@bracketed/logger
v1.0.10
Published
An alternative to your run-of-the-mill node console logging functions!
Downloads
29
Readme
An alternative to your run-of-the-mill node console logging functions! This is a package built from the source code of @sapphire/framework & @sapphire/plugin-logger to allow usage of Sapphire's logger features in regular Node.js, full credit to the authors of the pieces of code that this package is made from.
- A Logger package built from @sapphire/framework & @sapphire/plugin-logger that uses colorette for styling.
Install via yarn
or npm
:
yarn add @bracketed/logger
npm install --save @bracketed/logger
// ESM
import { Logger, LogLevel } from '@bracketed/logger';
const console = new Logger();
console.info('Hello World!');
console.debug('Hello World!');
console.warn('Hello World!');
console.error('Hello World!');
console.fatal('Hello World!');
console.trace('Hello World!');
console.write(LogLevel.Info, 'Hello World!');
// CJS
const { Logger, LogLevel } = require('@bracketed/logger');
const console = new Logger();
console.info('Hello World!');
console.debug('Hello World!');
console.warn('Hello World!');
console.error('Hello World!');
console.fatal('Hello World!');
console.trace('Hello World!');
console.write(LogLevel.Info, 'Hello World!');
Feel free to contribute to this project, join our discord and help us with future development of Project Bracketed. Please also notify us of errors within our projects as we may not be aware of them at the time.