@caviajs/logger
v0.2.4
Published
ecosystem for your guinea pig
Downloads
19
Readme
Introduction
This package includes a Logger
with which you can create logs and manage sensitivity.
Usage
Installation
npm install @caviajs/logger --save
Logging
import { Logger } from '@caviajs/logger';
Logger.trace('Hello Cavia');
// or with params
Logger.trace('Hello Cavia', { requestId: 'f9ed4675f1c53513c61a3b3b4e25b4c0', /* ... */ });
Sensitivity
If you want to change the sensitivity of the logger, you just need to set the environment variable LOGGER_LEVEL
.
OFF
- logger turned off,FATAL
- onlyFATAL
logs,ERROR
-ERROR
and all of above levels (exceptOFF
),WARN
-WARN
and all of above levels (exceptOFF
),INFO
-INFO
and all of above levels (exceptOFF
),DEBUG
-DEBUG
and all of above levels (exceptOFF
),TRACE
-TRACE
and all of above levels (exceptOFF
),ALL
(default) - all of above levels (exceptOFF
),