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 Ayende Rahien <Ay...@Ayende.com> on 2004/10/08 20:50:39 UTC
Problem configuring
In short, I can't log4net to do the logging.
I do:
private ILog logger = LogManager.GetLogger(typeof
(VisibleObjectContainer));
public VisibleObjectContainer(Type type)
{
Utility.CheckArgsNotNull(type);
if (logger.IsDebugEnabled) //ALWAYS false
logger.Debug("Creating a visible object container for: " +
type.FullName);
|
What am I missing?
I've the following App.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net-net-1.1" />
</configSections>
<log4net>
<appender name="UdpAppender"
type="log4net.Appender.UdpAppender">
<param name="LocalPort" value="8080" />
<param name="RemoteAddress" value="127.0.0.1" />
<param name="RemotePort" value="8080" />
<layout type="log4net.Layout.PatternLayout, log4net">
<param name="ConversionPattern" value="%date
[%thread] %-5level %logger %ndc - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref=" UdpAppender" />
</root>
</log4net>
</configuration>
And in my code I've:
[assembly : DOMConfigurator(Watch=true)]