how to specify switch value in logger?

Topics: Exception Handling Application Block, Logging Application Block
Jun 27, 2007 at 8:05 AM

I have added a categorySource name="Trace" and switchValue="Verbose".

now in my code i need to specify whether my message is verbose or warning or info.

how will i do that with logger.write method so that i can chang eht switchValue in config file and only the message with appropriate level will be logged?

it is similar to

Trace.writlineif("method entry", info);
Trace.writlineif("waring 1", warning);
Trace.writlineif("value of customer id 123", verbose);