4 ms·
I write my app’s logs in HTML. It allows me to format as tables, large fonts for alerts, colour for errors, embed images, all sorts of visual aids. Easy to scan
by GnarfGnarf 3y ago
I write my app’s logs in HTML. It allows me to format as tables, large fonts for alerts, colour for errors, embed images, all sorts of visual aids. Easy to scan and identify the important stuff at a glance.
There is one common function to format as low-level HTML, and a trivial markup code to simplify calling it.
- ducharmdev 3y agoAre the logs actually written as HTML, or are you logging objects (like structured logs) that are transformed into HTML when displayed? If the former, I would imagine that'd make searchability harder for larger volumes of logs.
- GnarfGnarf 3y agoThe logs are written as raw HTML. They can be searched by including HTML id's, tags, etc. They are plain text so they are searchable. The color option really makes things stand out. The formatting possibilities has made debugging so much easier.
- ducharmdev 3y agoI guess what I was getting at, when you are logging lots of data in something like Azure app insights, Splunk, etc., you don't have the luxury of being able to just scan your logs with your eyeballs, because there's simply too much information. Instead you log objects, and are querying logs almost like you would SQL.