Search code examples
loggingenterprise-library

Configuring Logging for multiple projects in solution


I am using enterprise library logging block 5.0. My solution has over 20 projects, most of them are class libraries. When configuring the enterprise library, do I need to add app.config in all the projects and create logging related sections in each of the config file?


Solution

  • No, you don't have to duplicate logging settings in all projects. You can create it once, store it in a single file or database and then use non-default configuration sources to share as described in Scenarios 2 and 3 of Developer's Guide. Appendix D - Enterprise Library Configuration Scenarios