Mulitple formatters writing to one flat file

Topics: Logging Application Block
Sep 7, 2009 at 6:41 AM


Is this possible?  I want to have multiple formatters writing to the same flat file depending on the source category. For example, the log file is appname.log.  if the source category is error message, i want  to use on template that includes many tokens, but if its an informational message, i just want to use a different set of the available limited tokens.


Sep 7, 2009 at 8:00 AM


Here is one option:

You can configure 2 category and 1 trace listener (flat file). For each logging process you will need to update the config of the logging app block, to change the associated formatter. try the solution that is described here: .

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.

Sep 8, 2009 at 3:17 PM
Thanks for the link. I will give it a try.