| ▲ | dpark a day ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||
They were replying to a person who says “it’s almost always wrong for library functions to log anything”. Not just errors. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | Retric a day ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||