Safe, Simple, Glanceable Logging
npm i @korzun/log
or
yarn add @korzun/log
Control the level of logging emitted. Defaults to error
.
LOG_LEVEL='debug'
import { create as createLog, Level } from '@korzun/log';
const log = createLog({ level: Level.Debug });
Disable colors where they're not needed or supported. Defaults to true
.
LOG_COLOR='false'
import { create as createLog } from '@korzun/log';
const log = createLog({ color: false });
Disable prefixes where glanceability isn't relevant. Defaults to true
.
LOG_PREFIX='false'
import { create as createLog } from '@korzun/log';
const log = createLog({ prefix: false });