5.0.2 • Published 2 years ago
@kobionic/logger v5.0.2
Logger
Nothing new here, just a customized logger. Btw, thank you Winston.
Installation
npm install @kobionic/logger
Usage
import logger from '@kobionic/logger';
import Koa from 'koa';
logger.info('Hi there!');
const app = new Koa();
app.use(logger.getHttpLogger('koa'));
Configuration
Configuration of the logger is done using environment variables. Available variables are described below:
Variable | Type | Default | Description |
---|---|---|---|
FORCE_COLOR | number | 1 | removes colorization from logging output if set to 0 |
LOGGER_CORRELATION_ID | string | randomly generated | overrides randomly generated logger correlation ID |
LOGGER_DIR | string | ./logs | sets log file(s) directory |
LOGGER_LEVEL | string | info | sets logging level (debug | error | info | none) |
LOGGER_NAME | string | application name-YYYY-MM-DD.json|log | overrides dynamically generated log file name |
LOGGER_PRINT_CORRELATION_ID | boolean | false | adds correlation ID to the logging output if set to true |
LOGGER_WRITE_TO_FILE | boolean | false | writes logging output to a .json and .log files if set to true |
Run Tests
npm test
Authors
- Jeremie Rodriguez <jeremie.rodriguez@kobionic.com> - Main developer
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
5.0.2
2 years ago
5.0.1
2 years ago
5.0.0
3 years ago
4.0.6
3 years ago
4.0.5
3 years ago
4.0.4
3 years ago
4.0.3
4 years ago
4.0.2
4 years ago
4.0.1
4 years ago
4.0.0
4 years ago
3.2.2
5 years ago
3.2.1
5 years ago
3.2.0
5 years ago
3.1.0
5 years ago
3.0.1
5 years ago
3.0.0
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.0
6 years ago
1.0.0
6 years ago