48 ms·
Do you have anecdotes you can share? :D
by vikiomega9 10y ago
Do you have anecdotes you can share? :D
- flukus 10y agoQuite a few, but the worst would be the custom logger. I got lost trying to trace the inheritance graph. which spans projects, and the dependency graph, loggers within loggers within loggers. I gave up when I ran out of space trying to sketch the relationships in my notepad. Being encapsulated means you don't actually have any control over the logger, or the threads it spins up. Creating a logger for a new app requires inheriting from a application logger (which is already 3 or 4 layers deep in the inheritance hierarchy. The distinction other loggers make between the log interface and the appenders are non-existent. If you want to log to a new source (say the event log) you have to add a new layer to the inheritance tree. Then there's the fact that it's handling the application state, in an "on error resume next" kind of way. And this is a global state, so don't even think about multi threading. Naturally, actually accessing the logger is done via a singleton. It causes more problems than it helps resolve, and the ones it causes naturally don't have an diagnostic information available. There are plenty of others, but it's hard to top this tour de force of OO anti patterns. If only there was some free and stable alternative...
- GFK_of_xmaspast 10y ago> If only there was some free and stable alternative... There's no shortage of good-enough loggers out there for major languages.
- pkroll 10y agoThe ellipsis in this case appears to me to be a sarcasm indicator, not a real wish.