Patterns For Logging Diagnostic Messages

PatternsForLoggingDiagnosticMessages is a pattern language by NeilHarrison presented in PatternLanguagesOfProgramDesign #3. It's also available under http://www.cs.wustl.edu/~schmidt/PLoP-96/. I really like it because I HaveThisPattern language. There are 3 patterns:

-- JohnFarrell
'''Three Patterns (Quoted from the paper's Abstract)
An 'aha!' moment. I was having irritations with my existing logging framework (which used an arbitrary collection of named channels). Reordering it as a hierarchy and handing off requests to the parent channel if undefined has made it all so much more controllable. So I now HaveThisPattern 'TypedDiagnostics?'. Thanks. -- FrankCarver

Just a passing note: in the program I'm working on presently, I decided to do my logging of both diagnostics and generally-interesting information via a simple SysLogd? client. There was already one written for my environment, but they're very simple to write anyway. Saved me the bother of a bunch of simple but tedious log handling code. But of course this is orthogonal to what you guys are saying. -- LukeGorrie


I've seen OLTP systems that contain a great deal of concurrency with many users doing their thing at the same time. Part of the logs contain DiagnosticInformation?, useful in determining the cause of any ills (should they appear). The ability to view logs by user, transaction or real-time interleaved can be very valuable depending on the perspective you're after at the time. With distributed applications this can become even more important as knowing the triggers for various events can key critical. -- DanGreen


log4j (LogForJava) is a free Java package that uses these patterns. -- NelsonMinar

LogForRuby and LogForCpp are clones for RubyLanguage and CeePlusPlus, respectively.


See also LoggingBestPractices, LoggingDiscussion, LoggingToaQueue
CategoryLogging

EditText of this page (last edited January 18, 2012) or FindPage with title or text search