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: * DiagnosticLogger - create a singleton through which all diagnostic messages are reported. The singleton is used to configure the destination of the messages. * DiagnosticContexts - add contextual information to diagnostic messages. See KeepErrorInformation. * TypedDiagnostics - implement a hierarchy of types of diagnostic messages. -- JohnFarrell ---- '''Three Patterns (Quoted from the paper's Abstract) * The first pattern - DiagnosticLogger ** Separates logging from the rest of the software, and lays the groundwork for the other patterns. * The second pattern - TransactionalBuckets ** Provides association of diagnostics with the correct transactions. * The third pattern - TypedDiagnostics ** Helps ensure uniformity of presentation for all diagnostics. ---- 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