Custom LogFilter: how to do strong typed configuration?

Topics: Enterprise Library Core, Logging Application Block
Jun 11, 2007 at 11:07 AM

i have written a custom filter for the Logging Application Block that filters log entries based on their severity. Now i would like my users to be able to use the Enterprise Library Configuration Tool to configure my filter. For each category source you can configure a source level (error, warning, ...) by selecting a value from a drop down list. This is exactly the functionality i need.

By inspecting the build-in filters i understand that i need the following classes for my "SourceLevel" filter:
- SourceLevelFilter
- SourceLevelFilterData
- SourceLevelFilterAssembler
- SourceLevelFilterSetting

Now i need some help because i have no idea how i can tell the Enterprise Library Configuration Tool to use these classes. Out of the box the tool only allows to add a CustomFilter which can be configured with name-value attributes. But i would like the configuration to be stong typed.

Can anybody point me to the right direction?
Regards, Rainer
Jun 11, 2007 at 3:15 PM
I would look at the following:

1. Strongly-typed filters in the SourceCode as examples.
2. Application Block Software Factory Videos here.
3. Discuss this in the EntLibContrib Project which is about extending Enterprise Library.




David Hayden
Microsoft MVP C#
Jun 11, 2007 at 3:26 PM
Hi David,

thank you for pointing me to the EntLib Contrib project. This is definitely a better place to discuss this.

Regards, Rainer