node-gitlab-logging
node-gitlab-logging is a custom log handler that has been written with the purpose of auto-opening (and assigning) issues on GitLab everytime something goes south with NodeJS code.
Useful for production deployments, where you want to track the issues directly from GitLab, not from a dark server log file.
node-gitlab-logging is smart enough to recognize similar errors, thus not opening blindly a new issue everytime.
Setup
-
Add
gitlab-logging
to your package.json dependencies. -
Then, require and configure the module using the code below:
gitlab_logging = ; /* GitLab options */gitlab_logging;
- Then, when you need to handle an error, just call:
// Boom, the error variable value will be redirected to your GitLab issues tracker!gitlab_logging;
- If you need to catch all unhandled errors (which is recommended!), use the following code:
process;
- Enjoy!
Notes
-
This module is kept up-to-date with latest GitLab API changes. Thus, ensure you're running the latest GitLab version in time when using node-gitlab-logging!
-
node-gitlab-logging has been built by the happy folks at Waaave Network, for their website needs.