@boost/log
Version:
Lightweight level based logging system.
17 lines (15 loc) • 577 B
JavaScript
import chalk from 'chalk';
import { msg } from './translate.mjs';
// In order of priority!
const LOG_LEVELS = ['log', 'trace', 'debug', 'info', 'warn', 'error'];
const DEFAULT_LABELS = {
debug: chalk.gray(msg('log:levelDebug')),
error: chalk.red(msg('log:levelError')),
info: chalk.cyan(msg('log:levelInfo')),
log: chalk.yellow(msg('log:levelLog')),
trace: chalk.magenta(msg('log:levelTrace')),
warn: chalk.yellow(msg('log:levelWarn'))
};
const MAX_LOG_SIZE = 10_485_760;
export { DEFAULT_LABELS, LOG_LEVELS, MAX_LOG_SIZE };
//# sourceMappingURL=constants.mjs.map