-
Jul 16th, 2009, 09:18 PM
#1
AOP for Logging loosing Contextual Information
Hi,
I'm very much interested in using Spring AOP for logging the entry and exit of all my classes.
However, on trying it out, I'm finding that we end up loosing the contextual information of logging when using a LoggingInterceptor.
What i mean is, using Log4J, we can use pattern like %C.%M to emit the Classname.Methodname in the logs.
If we use LoggingInterceptor, then this will appear as LoggingInterceptor.invoke() or some other method like that, and the actual method where I want the logging to appear doesn't appear.
I guess this will be the case all the time in the case of Proxied classes.
Is there ANY way to introduce code into the actual class itself, so that logging appears as though its coming from those classes?
Thanks,
--
Anish.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules