@storebox/logger
v0.2.12
Published
A logger for all cloud projects:
Downloads
4
Readme
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 |