3 ms·
If your library does not allow logging to network it does not mean that things won't be logged to the network, just that someone somewhere will have an addition
by jcelerier 4y ago
If your library does not allow logging to network it does not mean that things won't be logged to the network, just that someone somewhere will have an additional script that netcats the local output, overrides your function calls with LD_PRELOAD to inject the network calls or something like this. Preventing features from existing never makes things better.
- wizofaus 4y agoThere's always that risk, but there's not much worse than a logging framework that makes it's far too easy to affect system behaviour in unpredictable ways (looking at you log4j), or be unreliable in a way that you have no source of what's happened when it falls down itself.
- wizofaus 4y agoHaving said that, I know of at least two legitimate use cases for allowing arbitrary logging targets, both because of annoying limitations of the hosting environment. One being certain unit testing frameworks (e.g. Xunit in the .NET world requires you write to a custom destination for log messages to be captured by the test runner) and the other being AWS lambdas - where you don't even have the option of a separate process reading the log files for further processing. Ideally it would always be sufficient just to write to stdout or stderr.