Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Now our project has done half of year, we need to add logging framework on our code.For example:Enter/Exit funtion and occur exception is common requirement.I'd like to use AOP to finish.
But,spring.net AOP is face to interface, proxy only to use on interface,a class need inherit an interface can be proxy.Microsoft Enterprise library is also. The peoblem is we have lots of class that don't inherit interface. So if we change code structure will take a lot of offer, it is not a good way.PostSharp implement AOP through Attribute, it may be suitable for us, but PostSharp2.0 is not free.NAspect has little information can be found.
Above solutions are popular AOP solution, I hope use maturing framework to solve rather than coding by myself.Performance and extension are important to us.
I want to use AOP on our code, directly use on a class (don't inherit interface), do you have any solution, please help me.Thank you.
Posted

Try Semantic Logging from Microsoft. It's little complex to implement, but it has advantages.

http://channel9.msdn.com/posts/Introducing-Semantic-Logging[^]
 
Share this answer
 
Log4net is very simple to use yet powerful logging option

please reffer the following link

How to use log4net[^]
 
Share this answer
 
Comments
aihua1 4-Jul-13 22:13pm    
Log4net is only a logging tool.Directly use it to track state on code that will be dirty.Log4net can't accomplish AOP.Thank you for your answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900