Errsole is an open-source logger for Node.js. It has a built-in web dashboard to view, filter, and search your app logs.
errsole-demo.mp4
-
Easy Setup: Just insert the Errsole code snippet at the beginning of your app's main file. That's it!
-
Automated Log Collection: Errsole automatically collects all your app logs directly from the Node.js console.
-
Customized Logging: Errsole's custom logger provides multiple log levels, thereby enabling greater precision in logging. Additionally, you can include metadata with your logs and receive alerts for specific log events according to your preferences. Read More
-
Centralized Logging: Errsole consolidates all your app logs from multiple servers into one centralized database. You can choose your preferred database system.
-
Interactive Web Dashboard: Easily view, filter, and search your app logs using the Errsole Web Dashboard.
-
Secure Access Control: Errsole comes with built-in authentication, ensuring that only you and your authorized development team can access the logs.
-
Error Notifications: Errsole delivers notifications for app crashes and custom alerts directly to your Email or Slack.
-
Data Retention: You can specify the number of days you wish to keep your app logs.
A Node.js app using Errsole Logger can handle 90,000 more requests per minute than when using Elasticsearch and 70,000 more requests per minute than when using Amazon CloudWatch. Read More
![errsole-vs-elasticsearch-benchmarks](https://private-user-images.githubusercontent.com/3775513/351227293-e193e016-a14a-46c1-92af-865b3be27df4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5NTgzMTksIm5iZiI6MTcyMzk1ODAxOSwicGF0aCI6Ii8zNzc1NTEzLzM1MTIyNzI5My1lMTkzZTAxNi1hMTRhLTQ2YzEtOTJhZi04NjViM2JlMjdkZjQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MThUMDUxMzM5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTNiZjRkM2I3MTMwYjk2NmNkOWQ4NmIzMjM2N2U1MmNiZDFhYWUyNzMzMzAyZTdjNzMzYTdmN2JkNmRiMWQxOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.raeRdWHR-ndCeT25Txqk5iB4z5ia_HgGsgorigONgjQ)
- Errsole with SQLite for File-Based Log Storage
- Errsole with MongoDB
- Errsole with MySQL
- Errsole with PostgreSQL
- Errsole with MariaDB
- Errsole with OracleDB
- Advanced Configuration
After completing the setup, you can access the Errsole Web Dashboard through the following methods:
- Local Environment: Open your web browser and visit
http://localhost:8001/
. - Remote Server: If you have deployed Errsole on a remote server, use the server's IP address or domain name followed by the port number (e.g., YourServerIP:8001 or YourDomain:8001).
If you initialized Errsole with a different port or specified a custom path, adjust the URL as follows:
- Replace 8001 with your chosen port number.
- Append your custom path to the end of the URL.
http(s)://YourServerIP:CustomPort/YourCustomPath
If you encounter issues accessing port 8001 due to firewall restrictions, or if you prefer to host the Errsole Web Dashboard on your primary domain/port, you can configure the Errsole Proxy Middleware in your app. Here is a step-by-step guide: Proxy Middleware Configuration
The log function is used to log messages or information. It can accept one or more arguments, which can be strings, numbers, JavaScript objects, or Error objects.
errsole.log('Logging a message');
errsole.log('Multiple', 'arguments', 'are supported');
errsole.log('Logging with a variable:', var1);
errsole.log(new Error('An error occurred'));
errsole.log('Logging with an error object:', errorObject);
The alert function logs a message and sends a notification to configured channels, such as Email or Slack. It accepts the same types of arguments as the log function.
errsole.alert('Alert! Something critical happened');
The error function is specifically designed to log errors. It accepts the same types of arguments as the log function.
errsole.error(new Error('An error occurred'));
The warn function is used to log warning messages. It accepts the same types of arguments as the log function.
errsole.warn('This is a warning message');
The debug function logs debug information, typically used for troubleshooting during development. It accepts the same types of arguments as the log function.
errsole.debug('Debugging information');
In Errsole's custom logger, you can include metadata with your logs. This metadata can be any contextual information, such as HTTP requests or database query results. In the Errsole Web Dashboard, you can view this metadata in a clean JSON viewer without cluttering the log messages.
To include metadata in your logs, use the meta
function followed by the appropriate logging function (error, log, etc.).
errsole.meta({ reqBody: req.body, queryResults: results }).error(err);
errsole.meta({ email: req.body.email }).log('User logged in');
The meta
function must be the first function in the chain, followed by the desired logging function.
-
Encountering issues? Open an issue on our GitHub repository.
-
Have questions? Use our Q&A forum.
-
Want to request a feature or share your ideas? Use our discussion forum.
-
Want to contribute? First, share your idea with the community in our discussion forum to see what others are saying. Then, fork the repository, make your changes, and submit a pull request.