DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป is a community of 966,904 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for What are the most important features you look for in a logger?
Keff
Keff

Posted on • Updated on

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

I'm interested in knowing what are the most important features you look for in a logger? Should it have colored output, should it allow multiple output channels...

PD: I know it depends on the task you are approaching, but let's generalize for a bit :P

I currently maintain a Loggin' library for NodeJS and for the browser (partially), and wanted to gather some information on what features people want the most in a logger, as a way of improving the library.

Top comments (2)

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 Author

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

โฌ‡๏ธ The only reason people scroll to the bottom...

...is because they want to read more. Create an account to bookmark, comment, and react to articles that interest you.