Logging is a common case study in articles and books on AspectJ
(http://www.eclipse.org/aspectj/) and Aspect Oriented Programming
(AOP). Doing a quick search for "AspectJ" and logging came with
several articles including http://www.developer.com/java/other/
article.php/3109831
AspectJ allows you to write aspects (that is, rules) which are weaved
into the byte code of a Java application. Basically, you'd have your
app in Java, a few Aspects that describe the logging that should
occur on method entry and exit and the AspectJ compiler would produce
Java byte-code that would intermix instructions from your Java code
with those generated by the aspects.
Don't have any personal experience with AspectJ, so I can't do more
than point you that way. Experimenting with it has been on my to-do
list for quite a while.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]