1.0.4 • Published 3 months ago

@mobilabs/kzlog v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
3 months ago

KZlog

NPM version GitHub last commit Github workflow Test coverage npm bundle size License

KZlog is a minimal lightweight logging library in Javascript that runs on the browser and on Node.JS.

Quick Startup

// name {String}: the name of the module/library,
// level {String}: the threshold level,
// highlight {Boolean}: log message printed in color or B&W,
const log = KZlog(name, level, highlight);
log.warn(message);
// output: [2019-4-17 18:39:37:357] [error] name: aaaa

API

Methods

KZlog provides the following methods:

MethodsDescription
helpdumps, to the console, the on-line
versionreturns the version of the library
setNameupdates the name of the module/library to be displayed
setLevelupdates the threshold level
setHighlightupdates the highlight mode
tracedumps a trace message
debugdumps a debug message
infodumps a info message
warndumps a warn message
errordumps a error message
fataldumps a fatal message

Threshold level

The default threshold level is trace. It can be set to trace, debug, info, warn, error, fatal or off.

License

MIT.

1.0.4

3 months ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

3 years ago

1.0.0

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago