3 ms·
I’ve done this before, don’t remember regretting it and always wonder why more don’t do it. I’ve even avoided any logging configuration files by configuring p
by derriz 3y ago
I’ve done this before, don’t remember regretting it and always wonder why more don’t do it. I’ve even avoided any logging configuration files by configuring programmatically during application startup.
I like minimal application configuration and find the “configuration surface” offered by most logging libraries much too large and also see it as a burden for users to learn/google the configuration file format of the chosen implementation.
I prefer to offer minimal and ergonomic logging configuration options. Analogous to basic “-q”, “-v”, “-d” options typical of command line programs, which my code translates to whatever logging framework.
And you don’t end up spending ages fiddling with slf4f and other exclusions and version range stuff in maven.
- AtlasBarfed 3y agoThe most annoying part of logging frameworks is figuring out their logging format file. A very very very close second is figuring out where to put the fucking config file so the app will pick it up in preference to whatever defaults or packaged settings are. There's an article on the feed today about events that was hitchikers something and then threw about 10 more layers of sarcasm and meme on the subject, and one of the frustrations I have with current logging frameworks is that a truly mature logging framework needs a LOT of interesting things: - how about a per-user log? - how about a per-core or per-node log? - how about a per-request log? - event extraction and publishing And of course the issue of cross-system-boundary tracking/tracing. Sure, log aggregation and mining can help, but it seems like a very very big expensive hammer for an intricate peg and hole. Anyway, Log4j was written from the age of computer science where computers were single machine monoliths with a database (two-tier or three-tier: that's right systems architect in two or three boxes rather than https://www.youtube.com/watch?v=y8OnoxKotPQ https://www.youtube.com/watch?v=y8OnoxKotPQ