I'm looking for a way to have the my code automatically log errors or warnings in c# with the param name & value and the Action being attempted on it. I am willing to take the hit to performance for this. Currently the only way I can think of doing this is by not calling any method directly rather calling it via a executor (extension) method that would accept a expression/func. I would prefer however to not have to litter my code by doing this. Is there any way to do this?
Thank you