views:

71

answers:

1

I'm building a web app and want to enable logging/error tracking.

After reading the old question here, I choose Enterprise Library because I like the flexibility of handling various events/exceptions differently.

It was simple to setup and install. But, I am not sure how to publish the web application. Specifically... since the logging filepath names are currently set up to my dev machine; when I publish I need to change these to the production server?

I'm also unclear if I need to install the enterprise library on the server... or if the dlls that are included with the project are enough?

Another side question is if I can put the Enterprise Library's app.config and a custom wrapper in my own code library... and then simply add a reference to that code library in my web app. Will that affect how the logger works?

Thanks for the help!

+2  A: 

You should not be required to install anything on the server, the assemblies will be included in the publish/build.

The issue with the log file paths has a million answers, i assume that you have a handful of settings that need to change not just this filepath... connection strings, et al. what i would do is have a config file for each environment that you will need different settings. Then setup a build script to select the correct config file based on what build type you are running. The link below already covers what you asking for.

http://stackoverflow.com/questions/305447/using-different-web-config-in-development-and-production-environment

Now I'm not sure why you want to embed a config file in your assembly... having it embedded in an assembly defeats the purpose of a config file... you want the ability to alter settings without requiring a recompile.

YetAnotherDeveloper