npm.io
1.0.4 • Published 1 year ago

@korzun/log

Licence
MIT
Version
1.0.4
Deps
0
Size
42 kB
Vulns
0
Weekly
0

Log

npm version

Safe, Simple, Glanceable Logging

Installation

npm i @korzun/log

or

yarn add @korzun/log

Configuration Options

Level

Control the level of logging emitted. Defaults to error.

Environmental Variable
  LOG_LEVEL='debug'
Code
  import { create as createLog, Level } from '@korzun/log';
  const log = createLog({ level: Level.Debug });
Colors

Disable colors where they're not needed or supported. Defaults to true.

Environmental Variable
  LOG_COLOR='false'
Code
  import { create as createLog } from '@korzun/log';
  const log = createLog({ color: false });
Prefix

Disable prefixes where glanceability isn't relevant. Defaults to true.

Environmental Variable
  LOG_PREFIX='false'
Code
  import { create as createLog } from '@korzun/log';
  const log = createLog({ prefix: false });

Keywords