Package which provides access to most commonly used logger instances.
Default logger. Logs errors to a file, everything else to console.
Kafka events logger. Logs to a rotation file. File is rotated every 7 days or when 50MB size is reached.
HTTP requests logger. Logs to a rotation file. File is rotated every 5 days or when 100MB size is reached.
Incoming HTTP requests logger. Logs to a rotation file. File is rotated every 5 days or when 100MB size is reached.
Calling this function will start automatic logging of incoming express HTTP requests. It uses the "accessLogger" logger.
import {
logger,
kafkaLogger,
httpLogger,
accessLogger,
autoLogExpressRequests
} from 'common-loggers-pkg';