5 ms·
There is a lot of confusion around logging because software developers use it to debug code whereas IT people use it to manage alarms in systems. Call me an id
by jhrobert 19y ago
There is a lot of confusion around logging because software developers use it to debug code whereas IT people use it to manage alarms in systems.
Call me an idiot but I did write custom loggers multiple times in the past.
I did that because I use a lot of trace messages for debugging and that is so unusual that it kills the existing loggers big way.
Nowadays I don't do that anymore, I use the system logger. I do that because I managed to find a way to factorize the logging logic out from the filtering logic.
For example in JavaScript I do
var de = isEnabledTraceXXXXX();
xxx
de&&bug( "Tracing YYYY");
This is ultra efficient and readable thanks to the && progressive operator. For those interested, I described that trick there: http://virteal.com/DebugDarling http://virteal.com/DebugDarling