Announcement Announcement Module
Collapse
No announcement yet.
logging Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • logging

    Hi,

    If we use AOP for logging,then we can only log Class name and method name in the advice.What if we want to log class variables and method variables.
    We can always typecast the object and get the actual class variable in the advice and then log our desired variables but it does not look a good option as we may have 1000 of classes and type casting each of them in the advice does not look good.

    Please suggest.

    regards,
    Reena

  • #2
    Class variables are hard to get you would have to use reflection on the object to get those. The method arguments are easy you can ask the JoinPoint for the arguments. I suggest you read the chapter about AOP in the reference guide that explains it.

    Comment

    Working...
    X