I’m happy to introduce the Advanced Logger Extension for Wappler, a powerful and flexible logging solution for your Wappler projects. This extension enhances the existing logging functionality by integrating the Pino library, Logtail for log aggregation, and Sentry for error tracking.
Key Features:
Customizable log levels
Async logging
Pretty printing for console output
Integration with Logtail and Sentry
Log redaction support for sensitive data
Log file management (automatic creation and removal)
Flexible transport configuration (console, file, Logtail, and Sentry)
Multiple concurrent types of transport
To help you understand and make the most of this extension, I’ve created a YouTube video that explains its features and benefits. It’s my first YouTube video, so these will hopefully improve over time.
You can find the GitHub repo containing the extension and comprehensive documentation here:
Feel free to give it a try and share your feedback! I hope you find the Advanced Logger Extension a valuable addition to your Wappler projects.
Somehow missed this. This is absolutely amazing! Thank you so much Tobias.
Will need to make some time to set this up, when I do I’ll make sure to give feedback
Btw I didn’t update the docs, yet but you can simply install the extension with npm i wappler-advanced-logger instead of cloning the files from GitHub. This will move everything to the right directories and auto-update the extension for you.
Yeah, that would be possible. But people can also just let me know what transports they would like me to add, and I add them to make sure it is 100% compatible with the extension.
I have a local version that has opensearch integrated, and I’m open to adding more.
Pull requests are welcome as well. Anyways making it modular, as you suggested, would be an option as well.
Please update your extension if you use redaction keys and the HTTP logger enabled by default.
pino-http has a bug that redacts the logs of HTTP requests AND removes the actual objects from the requests. This can lead to authentication requests etc., failing. I just pushed a fix for that.
I’m using Advanced Logger with Sentry which is working properly logging, except that LOG_ENVIRONMENT does not flow through to Sentry. Everything’s coming up in Sentry as production, despite me setting to development.
no that’s not expected behavior.
But I already built a better middleware for Sentry and didn’t update the advanced logger with that one, yet. I might release it as a standalone extension and remove Sentry from the logging extension since the new middleware tracks full stack trace etc and is way better overall.
Feel free to send me a dm and I can send it to you for testing tmr.
Also: for Windows users that are looking to inspect these log files. I have tried https://github.com/zarunbal/LogExpert
and it works pretty well. you need to use columnizer>Jsoncolumnizer.JsonColumnizer in order the get the logs in a nice table format.
To make it more readable I changed the date formatting to something more human readable by adding one line to const logger in advanced-logger.js:
I need to discontinue this extension. It will still be available on GitHub and NPM, but you'll need to maintain it yourselves from now on, including submitting pull requests for any security fixes.
Hi Bruno, it is quite time-consuming to maintain all the extensions I released so I will need compensation for that work going forward. I will keep the current versions online and I will accept pull requests so that the community can maintain these extensions but all further updates I apply will be in private repositories and only accessible to people who fund that work.