5.0.2 • Published 2 years ago

@kobionic/logger v5.0.2

Weekly downloads
-
License
Apache-2.0
Repository
gitlab
Last release
2 years ago

Logger

npm version License Code style Build status

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:

VariableTypeDefaultDescription
FORCE_COLORnumber1removes colorization from logging output if set to 0
LOGGER_CORRELATION_IDstringrandomly generatedoverrides randomly generated logger correlation ID
LOGGER_DIRstring./logssets log file(s) directory
LOGGER_LEVELstringinfosets logging level (debug | error | info | none)
LOGGER_NAMEstringapplication name-YYYY-MM-DD.json|logoverrides dynamically generated log file name
LOGGER_PRINT_CORRELATION_IDbooleanfalseadds correlation ID to the logging output if set to true
LOGGER_WRITE_TO_FILEbooleanfalsewrites logging output to a .json and .log files if set to true

Run Tests

npm test

Authors

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