loading...

re: Should a library log its version number ? VIEW POST

FULL DISCUSSION
 

Libraries doing any kind of logging is a horrible thing.

Results in polluted logs and all sorts of problems that are easily prevented by just allowing developers to either pass in a logger of their choice or return back data when calling whatever things it exposes and then letting me decide what to log.

 

I agree with the polluted logs argument. But I can see some pros to log too. I like the passed logger tho

 

Similar with libraries outside js world too, personally I would extend this thought process to all I/O unless that's the purpose of the library.

code of conduct - report abuse