Re: log4net. Where to put BasicConfigurator.Configure() when your code spans multiple projects

Tech-Archive recommends: Speed Up your PC by fixing your registry



* Dinsdale wrote:
I tend to put mine in my most upper level class before the UI or the
EnterpriseService wrapper,

Ok, for me I dont have any top level class so the only place I could
conievabely configure the root logger is in the UI (which I dont want to
do in case different UI's are used, or the UI is infact removed
completely). Does it make sense for each class to initialise it's own
root logger or should there be just one BasicConfigurator.Configure()
(or similar initiatlisation statement) within a solution? i.e. does
this hierarchial logging only work if Configure() is used in one place
only? Also what about calling GetLogger() within a class in a seperate
project, how does it get connected to the root logger in the calling
app/site/client if that is itself in a different project?

Sorry if my questions are confusing , it's because I myself am confused :-)
.