views:

123

answers:

1

I'm marking verbose log entries like this:

Logger.Write(new LogEntry 
{ 
    Message = "Using debug quote id...", 
    Severity = TraceEventType.Verbose 
});

How do I configure enterprise library event listener to log non-verbose events only

A: 

You need to set your trace switch to only listen for Warning or Error level events. You can do this in your application .config file.

Check out this article or this one from MSDN.

TLiebe
One more quick question. How do I temporarily disable listener. Remove it from within source?
Sergej Andrejev
You should be able to set the TraceLevel to 0 (None). Have a look at http://msdn.microsoft.com/en-us/library/3at424ac(VS.80).aspx.
TLiebe