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 Byron Neudesic <by...@neudesic.com> on 2012/02/08 18:42:10 UTC
UpdAdapter does not seem to be working
Hi All,
I have been attempting to use the UdpAdapter and Chainsaw to demonstrate
alternative logging methods. It does not seem that when I try to send a log
message that the UdpAdapter is actually sending messages.
I am sending messages to the event logger, and that is just fine. I am
wondering if there are some advice I can be given to determine the possible
cause of my issues.
I am running Windows 7 Enterprise 64 bit, VS 2010 Ultimate using the NET 4.0
framework.
To troubleshoot, I also installed Wireshark to have an independent tool to
determine if messages are getting sent. It registers no messages on the port
that I have selected to send the logging. I have disabled my firewall to see
if that would resolve the problem.
I am not getting any errors from the logger to indicate that I am not able
to initalize the appender. However, when I look at the appender collection
on the log instance, it shows a count of zero. This is the case even when I
successfully log to the the event log, so I am not sure if that is a
concern.
I know that UDP is not guaranteed delivery; I am OK with that. I just want
to know that I am actually sending the messages.
Here is my config for my app:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
</configSections>
<appSettings>
</appSettings>
<log4net>
<appender name="UdpAppender" type="log4net.Appender.UdpAppender">
<remoteAddress value="127.0.0.1" />
<remotePort value="13925" />
<layout type="log4net.Layout.PatternLayout, log4net">
<conversionPattern value="%-5level %logger [%property{NDC}] -
%message%newline" />
</layout>
</appender>
<appender name="EventLogAppender"
type="log4net.Appender.EventLogAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger
[%property{NDC}] - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="UdpAppender" />
<appender-ref ref="EventLogAppender" />
</root>
</log4net>
</configuration>
Here is the config for Chainsaw:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="true">
<plugin name="UDPReceiver" class="org.apache.log4j.net.UDPReceiver">
</plugin>
<root>
<level value="debug"/>
</root>
</log4j:configuration>
Thanks in advance,
Byron
--
View this message in context: http://old.nabble.com/UpdAdapter-does-not-seem-to-be-working-tp33287879p33287879.html
Sent from the Log4net - Users mailing list archive at Nabble.com.
Re: UpdAdapter does not seem to be working
Posted by Scott Deboy <sc...@gmail.com>.
It looks like this is an ipv6 issue with windows 7?
Looks like you can use 127.0.0.2 instead of 127.0.0.1 to get around the
issue.
On Wed, Feb 8, 2012 at 9:42 AM, Byron Neudesic
<by...@neudesic.com>wrote:
>
> Hi All,
> I have been attempting to use the UdpAdapter and Chainsaw to demonstrate
> alternative logging methods. It does not seem that when I try to send a log
> message that the UdpAdapter is actually sending messages.
>
> I am sending messages to the event logger, and that is just fine. I am
> wondering if there are some advice I can be given to determine the possible
> cause of my issues.
>
> I am running Windows 7 Enterprise 64 bit, VS 2010 Ultimate using the NET
> 4.0
> framework.
>
> To troubleshoot, I also installed Wireshark to have an independent tool to
> determine if messages are getting sent. It registers no messages on the
> port
> that I have selected to send the logging. I have disabled my firewall to
> see
> if that would resolve the problem.
>
> I am not getting any errors from the logger to indicate that I am not able
> to initalize the appender. However, when I look at the appender collection
> on the log instance, it shows a count of zero. This is the case even when I
> successfully log to the the event log, so I am not sure if that is a
> concern.
>
> I know that UDP is not guaranteed delivery; I am OK with that. I just want
> to know that I am actually sending the messages.
>
> Here is my config for my app:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <configSections>
> <section name="log4net"
> type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
> </configSections>
> <appSettings>
> </appSettings>
> <log4net>
> <appender name="UdpAppender" type="log4net.Appender.UdpAppender">
> <remoteAddress value="127.0.0.1" />
> <remotePort value="13925" />
> <layout type="log4net.Layout.PatternLayout, log4net">
> <conversionPattern value="%-5level %logger [%property{NDC}] -
> %message%newline" />
> </layout>
> </appender>
> <appender name="EventLogAppender"
> type="log4net.Appender.EventLogAppender" >
> <layout type="log4net.Layout.PatternLayout">
> <conversionPattern value="%date [%thread] %-5level %logger
> [%property{NDC}] - %message%newline" />
> </layout>
> </appender>
> <root>
> <level value="ALL" />
> <appender-ref ref="UdpAppender" />
> <appender-ref ref="EventLogAppender" />
> </root>
> </log4net>
> </configuration>
>
> Here is the config for Chainsaw:
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE log4j:configuration >
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> debug="true">
> <plugin name="UDPReceiver" class="org.apache.log4j.net.UDPReceiver">
>
> </plugin>
> <root>
> <level value="debug"/>
> </root>
> </log4j:configuration>
>
> Thanks in advance,
> Byron
>
>
> --
> View this message in context:
> http://old.nabble.com/UpdAdapter-does-not-seem-to-be-working-tp33287879p33287879.html
> Sent from the Log4net - Users mailing list archive at Nabble.com.
>
>