Re: C# log4net configuration

Posted 17 November 2010 - 02:55 PM

I found the solution. Properties > "Copy to output directory":"Always" -- and that did it.

As for the logger -- I had it set for the root logger which is fine, in the end I will probably establish a few loggers as I need to do several different kinds of logging (including an email notification). I could not even get my test app to work so I was freakin' out.

Re: C# log4net configuration

yes as a Java developer I am a big fan of log4j and so I figured that if even half of the features are available in log4net I would have a solid foundation for the logging.

Specifically what I am hoping is supported is NDC's (which seem to "exist for compatibility with older versions of log4net") -- I need to track a particular operation as it moves though its lifecycle even though there are several "disconnects" where the application will go off and do other things.

So for example my application will receive a message say ID555 and then process it and submit that message to another system. The other system will eventually return a response (maybe today, maybe next week but definitely not immediately). I want to be able to keep a continuous log of the activities of ID555 as it is processed. Log4J could do it, and I *think* log4net can as well.

Re: C# log4net configuration

Posted 17 November 2010 - 03:20 PM

Interesting...let us know if it works. Might come in handy for me in the future. I use thread contexts in a using() block strictly to keep track of the current command being executed, I don't do anything too fancy.

Re: C# log4net configuration

Posted 17 November 2010 - 03:28 PM

In web apps I often use context to keep track of a particular user session or transaction. that way I can know exactly which little &^$#-head found it funny to register with the name: "BOB;DROP TABLE USERS"