Just caught an interesting post come through JavaBlogs regarding Atlassian’s approach to providing additional context when logging errors in Confluence.
It brought something to my attention that was previously unknown, that is the Log4j mapped diagnostic contexts (not to be confused with the nested diagnostic contexts or NDCs). See the log4j wiki entry on NDCvsMDC.
Evidently I live in a cave (or perhaps have been using commons-logging for too long) but basically a MDC is a thread-local’d structure exposing a map-like interface that, depending on your logging pattern, can be included in your logged messages. Particularly useful stuff if you’re developing a multi-threaded system (be it swing, j2ee or some other inherently multi-threaded framework) and want to provide useful debugging information.
UltraLightClient has an entry in their code community providing a logging example using MDC and Log4j.
Nice and simple.
-
Pet Peeve: Don’t email my password to me in plain text You know the drill.
Signup for some random service on the internet
Receive a confirmation email with your account information
or
Forget a password for some random service ...
-
Eclipise Memory Analyzer (MAT) I must say the Eclipse Memory Analyzer looks pretty slick. There is some pretty good material over on the developers blog. Lastly, there was a talk on it ...
-
Open-source Web-based Code Review Tool: Rietveld Guido van Rossum, of Python fame, has recently released a Django-based application that enables web-based code reviews... Rietveld.
It supports any language and currently can hook into Subversion repositories. You ...
-
An implementation of the JVM in Javascript? Caught this over on JavaPosse Google Groups.
Essentially, some bright fellows over in Japan have developed a bytecode->javascript compiler. There's a demo floating around that took a Tetris ...
-
Facebook Chat? So it looks like the Facebook Chat service has finally started rolling out to my network (Facebook Chat has been mentioned previously).
Not quite sure how ...
Latest Entries
- Lessons Learned as a Project Lead
- Good ANTLR Resource
- Testing with Unitils
- Headed to Kelowna for a short vacation (and the laptop stays behind)
- Seam + Groovy + Maven : Nice Simple Hibernate POJOs
- Pet Peeve: Don’t email my password to me in plain text
- Eclipise Memory Analyzer (MAT)
- caBIG Annual Meeting - A developers perspective
- OS X + Java6: java.lang.UnsatisfiedLinkError: /usr/lib/java/libObjCJava.A.dylib
- Getting started with JBoss Seam and Maven
Blogroll
No Comments
Leave a Comment
trackback address