This post originated from an RSS feed registered with .NET Buzz
by Udi Dahan.
Original Post: Logging as an Aspect - bad idea
Feed Title: Udi Dahan - The Software Simplist
Feed URL: http://feeds.feedburner.com/UdiDahan-TheSoftwareSimplist
Feed Description: I am a software simplist. I make this beast of architecting, analysing, designing, developing, testing, managing, deploying software systems simple.
This blog is about how I do it.
Now that I have your attention, let me rephrase that. If all you want to log is what method was called and with what parameters, knock yourself out, go and use aspects (maybe like this).
But what about when something interesting happens and you want to log that? Something interesting, maybe some like this: as a result of his last purchase, customer Joe got upgrade to 'preferred' status. If anything, you'd like this information to be logged differently than all that other crap. The last thing we want with logging is to (re)create the needle in a haystack problem.