DEV Community

Discussion on: What are the most important features you look for in a logger?

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

The number one thing I look for is flexibility, even if just in the form of extensibility. Mostly because that's what I, as an end user, expect from the logging functionality of any application I use. As a user I shouldn't have to jump through hoops to get stuff like log rotation or logging to syslog to work, and therefore when developing software, I shouldn't need to jump through hoops to enable such functionality for my users.

The logging package that's part of Python's standard library is a good example of a logger that I feel covers this aspect very well. Filtering, formatting, and dispatch are all handled in an extremely extensible manner, and the dispatch side of things includes a bunch of useful options as part of the package itself, including logging to arbitrary Stream objects, sending log records via email or webhooks, and even offloading log processing to a different thread or process.

Collapse
 
nombrekeff profile image
Keff

Cool, thanks for the explanation, I've always considered it very important, that it is extensible/flexible!