@blockr/blockr-logger
v1.3.0
Published
The general logger used within typescript blockr projects.
Downloads
3
Readme
blockr-logger
The general logger used within typescript projects.
|CI|SonarQube|Version| |:-:|:-:|:-:| ||||
The logger is capable of the following log levels:
2019-04-25 17:53:21 [info]: info logging
2019-04-25 17:53:21 [warn]: warn logging
2019-04-25 17:53:21 [error]: error logging
All levels are formated in the same way: date
time
[level
]: message
Each message will be presented to the console and written to their respective log files. These files will always be written to a folder called logs
located in the root of the application folder. The logger will generate two separate log files. One named full.log
that contains all messagesfrom all levels. And one named error.log
containing only error level messages.
Importing
ES6
import { logger } from "@blockr/blockr-logger";
ES5
const logger = require("@blockr/blockr-logger");