Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] General Best Practice Question


Hi,
I'm currently in the process of developing the architecture for a new web application.  I started playing around with AspectJ and I think its a pretty impressive technology that I'd like to utilize within our application.  I know that in the previous version of our application we spent quite a bit of time doing maintenance on things that could be classified as "Cross-cutting concerns" especially logging.

What I'd ultimately like to do is be able to have no logging code in our application.  All logging would be done in advice.  That way logging could be tweaked with no change to the base application.  I'm having a problem figuring out how to make that happen.  We have logging statements peppered throughout the code.  Methods can exit with errors for different reasons.  We do try/catch in our code and its the specific functionality which indicates whether the information logged is an error, warning or informational.

Have other had the same issues?  It would seem that error messages, using aspects, would be more "Generic".  Has that been found to be acceptable?  How do the correct severities get logged?

I guess, ultimately, I'm looking for some best practices from an actual application that's been put into production.  Anyone have any best practices that they can share?

Thanks a lot!
Mike Ehlers
mike.ehlers@xxxxxxxxxx

Back to the top