I want to configure a FileTraceListeners in my application, that ignores 'verbose' level messages but logs 'information' level and above as well as 'start' and 'stop' events.
Everything is configured within the app.config file. However I cannot find the correct syntax for combining these different trace levels. The Syntax for filters is explained here.
Using a single filter for 'information' will correctly filter out everything that is not 'information', 'warning' 'error' or 'critical'. However I also want to include 'start' and 'stop' events.
I tried using 2 filters :
<filter type="System.Diagnostics.EventTypeFilter" initializeData="Information"/>
<filter type="System.Diagnostics.EventTypeFilter" initializeData="ActivityTracing"/>
I tried combining the initializeDate
with commas:
initializeData="Information,ActivityTracing"
or semicolons initializeData="Information;ActivityTracing"
everything will just cause a syntax error.
How do I combine these two filters inside app.config?
(I am using the native .net 3.5 logging libraries and do not wish to change to log4net or another framework at this point.)