You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by psandler <ps...@yahoo.com> on 2013/06/14 14:53:47 UTC

Log4Net works in Dev without calling XMLConfigurator?

Stackoverflow post is here:
http://stackoverflow.com/questions/17091629/log4net-not-logging-when-deployed?noredirect=1#comment24743599_17091629

Couldn’t get it working when deployed, but someone pointed out that I had to
call XMLConfigurator, which I neglected to do, despite the fact that I have
used log4net dozens of times.  I was also missing the reference to the
log4net section in the "configSections" area of my web.config.

For some reason, the logging still works in my development environment (i.e.
while debugging).

Is this normal?  What causes log4Net to get wired up correctly even without
the correct web.config reference and calling XMLConfigurator?




--
View this message in context: http://apache-logging.6191.n7.nabble.com/Log4Net-works-in-Dev-without-calling-XMLConfigurator-tp38348.html
Sent from the Log4net - Users mailing list archive at Nabble.com.

AW: Log4Net works in Dev without calling XMLConfigurator?

Posted by Dominik Psenner <dp...@gmail.com>.
Hi

For what it's worth, the logging should be initialized with the default settings. That happens to be a root logger and nothing more. So the apparently working loggers may be just an illusion.

Cheers,
D.

>-----Ursprüngliche Nachricht-----
>Von: psandler [mailto:psandler70@yahoo.com]
>Gesendet: Freitag, 14. Juni 2013 14:54
>An: log4net-user@logging.apache.org
>Betreff: Log4Net works in Dev without calling XMLConfigurator?
>
>Stackoverflow post is here:
>http://stackoverflow.com/questions/17091629/log4net-not-logging-when-
>deployed?noredirect=1#comment24743599_17091629
>
>Couldn’t get it working when deployed, but someone pointed out that I had
>to
>call XMLConfigurator, which I neglected to do, despite the fact that I have
>used log4net dozens of times.  I was also missing the reference to the
>log4net section in the "configSections" area of my web.config.
>
>For some reason, the logging still works in my development environment (i.e.
>while debugging).
>
>Is this normal?  What causes log4Net to get wired up correctly even without
>the correct web.config reference and calling XMLConfigurator?
>
>
>
>
>--
>View this message in context: http://apache-
>logging.6191.n7.nabble.com/Log4Net-works-in-Dev-without-calling-
>XMLConfigurator-tp38348.html
>Sent from the Log4net - Users mailing list archive at Nabble.com.