A simple JavaScript plugin that automatically logs your runtime errors, AJAX errors and rejected Promises.
Report a bug
·
Request a feature
Table of contents
jsLogger originated from the need to log the JavaScript errors that occur during runtime in a file.
It depends on having a logging platform in the backend to write in the file, but it takes care of detecting and logging code errors, AJAX errors and even rejected Promises.
It also offers the user simple methods to log anything they want with differents levels.
For jsLogger to work, all you need to do is set up a method in your backend that handles the logging.
In this example I'm using the .NET framework and NLog:
jsLogger automatically logs any error caused on runtime, any rejected Promise and any error caused in a AJAX request. But if you also want to manually log something, you can do it by using any of it's methods: Info, Debug, Error or Exception.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the project.
- Create your feature nranch (
git checkout -b feature/AmazingFeature
). - Commit your changes (
git commit -m 'Add some AmazingFeature'
). - Push to the branch (
git push origin feature/AmazingFeature
). - Open a
Pull Request
.
Distributed under the MIT License. See LICENSE
for more information.
Lucas Damián Lobasso - [email protected]
Project link: https://github.com/lucaslobasso/js_logger