title: How to implement custom LogAttribute on a Class
body: <p>I want to implement custom LogAttribute, which will log information at the start and end of each method in a class, also it should log error as well. I would like to apply the attribute over a Class.</p>
  
  <p>I have seen PostSharp. But I would like to have my own custom log attribute, rather than using PostSharp or similar library.</p>
  
  <p>Performance is the major key, the LogAttribute should not affect performance.</p>
  
  <p>I have read about the IMessageSync, but it affect performance.</p>
  
  <p>In MVC, we get CustomFilters, wherein we can have LogActionHandler, which will execute at the start and end of each Action method. I would like to implement similar in ASP.Net web Form.</p>
  
  <p>Can anyone help me by providing some sample code.</p>