@storebox/logger
TypeScript icon, indicating that this package has built-in type declarations

0.2.12 • Public • Published

storebox-logger

A logger for all cloud projects:

  • outputs JSON logs,
  • pretty prints logs (optional),
  • sends errors to Sentry (optional),
  • sends logs to Elasticsearch (optional),
  • rate limiting (optional, only for log.rl_info).

Config environment variables

Variable Default value Description
LOGGER_APP - Your app's name
LOGGER_ENV 'dev' The computing environment
LOGGER_LEVEL 'info' The minimum log level to display
LOGGER_STREAM_ELASTICSEARCH false Whether to stream logs to Elasticsearch
LOGGER_ELASTICSEARCH_NODE - The URL of the Elasticsearch node
LOGGER_PRETTY_PRINT false Whether to pretty print. SHOULD NOT be used in production
LOGGER_MAX_SERIALIZED_SIZE 1024 The maximum length of serialized objects
SENTRY_DSN - Sentry's DSN URL

Readme

Keywords

none

Package Sidebar

Install

npm i @storebox/logger

Weekly Downloads

61

Version

0.2.12

License

ISC

Unpacked Size

162 kB

Total Files

37

Last publish

Collaborators

  • stan.sarr
  • storebox-techadmin