Skip to content

spalx/common-loggers-pkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

common-loggers-pkg

Package which provides access to most commonly used logger instances.


Loggers

logger

Default logger. Logs errors to a file, everything else to console.

kafkaLogger

Kafka events logger. Logs to a rotation file. File is rotated every 7 days or when 50MB size is reached.

httpLogger

HTTP requests logger. Logs to a rotation file. File is rotated every 5 days or when 100MB size is reached.

accessLogger

Incoming HTTP requests logger. Logs to a rotation file. File is rotated every 5 days or when 100MB size is reached.

Other functions

autoLogExpressRequests(app)

Calling this function will start automatic logging of incoming express HTTP requests. It uses the "accessLogger" logger.


Imports

import {
  logger,
  kafkaLogger,
  httpLogger,
  accessLogger,
  autoLogExpressRequests
} from 'common-loggers-pkg';

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published