Results 1 to 4 of 4

Thread: Automatic logging for all classes under a web application

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    2

    Default Automatic logging for all classes under a web application

    Hi All,

    Is there anyone know how to make automatic logging for all classes (not only Services, Actions but Utils and other classes as well). I have used AspectJ or Spring AOP, but those frameworks can only do automatic logging for Services and Actions class. I need to log all classes under a web application, is it possible to do this things with Spring AOP / AspectJ?
    Thanks for the answer.

    Regards,

    Hendy Setyo Mulyo

  2. #2
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    Of course, you can use AspectJ to do this kind of tracing; you will need to use an AspectJ weaver (compile-time, binary, or load-time). Please visit http://eclipse.org/aspectj for more information.

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

  3. #3
    Join Date
    Nov 2006
    Posts
    2

    Default

    Hi Ramnivas,

    Thanks for the answer. But, is AspectJ weaver can be integrated with Spring Framework? Is there any example about this?
    Thanks again.


    Hendy

  4. #4
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    You don't really need a specific AspectJ integration with Spring to achieve your stated goal (Spring has integration with AspectJ, but since you need domain model crosscutting, you will need to look for the AspectJ weaver). Please visit the mentioned AspectJ site and you will get all the information you need.

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •