Discussions

News: Implementing Logging as an Aspect.

  1. Implementing Logging as an Aspect. (1 messages)

    Aspect Oriented Programming (AOP) is a programing paradigm, also referred to as a compliment to Object Oriented Programming (OOP). AOP tries to increase modularity by helping developers separate concerns.

    Printing the input and output of methods is the common practice every developer follows to debug the system. And many just leave that print command there. Sometimes these logs also help in tracing any bugs or issues within the system which the customer might otherwise face.

    Clearly these print/logging commands are cross-cutting concerns. It is possible to simplify these concerns using AOP.

    Read the full article on understanding AOP using Apsectwerkz and implementing the MethodCallTracer.

  2. Implementing Logging as an Aspect.[ Go to top ]

    Sure, simple tracing is easy to add via AOP.

    When one has local variables that one wants to output at particular locations within a method, however, there's really no good substitute for coding the logging right in.  Really good, useful logging requires more than a disjoint aspect.