Logtry
A Pino configurable logger for NodeJS to send logs to loggly and sentry
Requirements
Minimum Node.js version: 10
Installation
npm install --save logtry
Configuration
Key | Required | Description |
---|---|---|
LOGGER_NAME |
yes | Sets the name of the logger. |
LOGGER_LEVEL |
yes | Set the minimum level of logs. |
SENTRY_DSN |
no | Sentry DSN key (sentry-doc) |
LOGGLY_TOKEN |
no | Loggly token (loggly-doc) |
LOGGLY_SUBDOMAIN |
no | Loggly subdomain (loggly-doc) |
Use
// Using modules;// or if using common.jsconst logger = default; // Log a fatal error message:logger; // Log an error message:logger; // Log a warning message:logger; // Log an informational message:logger; // Log a debug message:logger; // Log a trace message:logger;
MIT Licensed
Contributing
Pull requests are always welcomed. 🙇🏻♂️ Please open an issue first to discuss what you would like to change.
Support
If you have any questions or need help with integration, then you can contact me by email alex.abidri@gmail.com.