| 
0
 | 
     1 <% title # Logging aspect %>
 | 
| 
 | 
     2 <p class="j">This aspect allows logging some diagnostic information with minimum efforts. 
 | 
| 
 | 
     3 All you need to do is to decorate your class with the Log attribute. 
 | 
| 
 | 
     4 If you have a class hierarchy you can decorate only your base class. 
 | 
| 
 | 
     5 Diagnostic information will be logged for all virtual and abstract members 
 | 
| 
 | 
     6 of your abstract class.</p>
 | 
| 
 | 
     7 
 | 
| 
 | 
     8 LoggingAspect.cs
 | 
| 
 | 
     9 <% ..\..\..\HowTo\Aspects\LoggingAspect.cs %>
 | 
| 
 | 
    10 
 | 
| 
 | 
    11 <p class="j">Here is the logging output.</p>
 | 
| 
 | 
    12 
 | 
| 
 | 
    13 <% txt #
 | 
| 
 | 
    14 4/20/2008 11:19:44 PM: HowTo.Aspects.LoggingAspectTest.BLToolkitExtension.TestClass.Test1(1) - 105 ms.
 | 
| 
 | 
    15 
 | 
| 
 | 
    16 4/20/2008 11:19:46 PM: HowTo.Aspects.LoggingAspectTest.BLToolkitExtension.TestClass.Test3("3") - 1507 ms
 | 
| 
 | 
    17                        with exception 'System.ApplicationException' - "Test exception.".
 | 
| 
 | 
    18 %>
 |