0.0.2-RC • Published 4 months ago

@acelikesghosts/logger v0.0.2-RC

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Logger

a simplistic logger for general purposes, wrapper around console

Examples

CJS:

const Logger = require('@AceLikesGhosts/Logger');

const logger = new Logger('prefix', void 0 /** default colors */, 'sub:prefix' /** optional */);
// prefix = "sub:prefix:prefix"
logger.info('hello!'); // same as `logger.log('hello!');`
logger.warn('uh oh!');
logger.trace('im here!');

Typescript:

import Logger from '@AceLikesGhosts/Logger';
import type { Colors } from '@AceLikesGhosts/Logger';

const colors = {
    // prefix: 'purple' -> or hex
    // etc,,,
} satisfies Colors;

const logger = new Logger('prefix', colors /** or `void 0` for defaults */, 'sub:prefix' /** optional */);
logger.info('hello!'); // same as `logger.log('hello!');`
logger.warn('uh oh!');
logger.trace('im here!');
0.0.2-RC

4 months ago

0.0.1-RC

4 months ago