logoalt Hacker News

dparklast Saturday at 9:55 PM1 replyview on HN

They were replying to a person who says “it’s almost always wrong for library functions to log anything”. Not just errors.


Replies

Retricyesterday at 4:30 AM

If it’s not your code how is a log useful vs returning an error?

Even relatively complex operations like say convert this document into a PDF etc basically only has two useful states either it worked or something specific failed at which point just tell me that thing.

Now independent software like web servers or database can have useful logs because they have completely independent interfaces with the outside world. But I call libraries they don’t call me.

show 1 reply