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 "Dietmar Winkler, T-AU" <Di...@tecan.com> on 2005/01/04 16:28:47 UTC

log4net and Chainsaw

Hi all,
I need some help in configuring Chainsaw to display logging output from
log4net
I use the latest build from CVS for log4net and Chainsaw V2.0alpha

My appender in the log4net configuration file looks like that:
	<appender name="UdpAppenderChainsaw"
type="log4net.Appender.UdpAppender">
		<param name="LocalPort" value="9999" />
		<param name="RemoteAddress" value="127.0.0.1" />
		<param name="RemotePort" value="4560" />
		<layout type="log4net.Layout.XmlLayoutSchemaLog4j">
		</layout>
	</appender>

...and this works fine for a self-written logging-viewer which consumes this
UDP stream (so I guess it´s not log4net´s fault, since the debug-output
looks fine and shows no errors!)

I use the following configuration file for Chainsaw:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> 
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="true">
     <plugin name="UDPReceiver" class="org.apache.log4j.net.UDPReceiver">
        <param name="Port" value="4560" />
     </plugin>
 </log4j:configuration>

...and in Chainsaw no logging requests are shown...

Does anybody out there have experience with configuring Chainsaw to consume
logging events from log4net?
...and if so, how the hell did you to that?


Best regards, Mit freundlichen Grüßen
 
Dietmar Winkler
Software Engineer

Re: log4net and Chainsaw

Posted by Ron Grabowski <ro...@yahoo.com>.
This is wrong. I was in Chainsaw last night and saw that I was in fact
using "v2.0alpha". I must have been confused with this
file:log4j-chainsaw-1.3alpha.jar. Chainsaw uses log4j v1.3 alpha.

--- Ron Grabowski <ro...@yahoo.com> wrote:

> I've gotten Chainsaw v1.3 and log4net to work using the following


Re: log4net and Chainsaw

Posted by Ron Grabowski <ro...@yahoo.com>.
I've gotten Chainsaw v1.3 and log4net to work using the following
Chainsaw config file. These two files are for a webapp running on
localhost. Save this XML to a file called udp.xml and load it when
Chainsaw boots up.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> 

<log4j:configuration
 xmlns:log4j="http://jakarta.apache.org/log4j/" 
 debug="true">
    
    <plugin name="UDPReceiver"
class="org.apache.log4j.net.UDPReceiver">
       <param name="Port" value="8080" />
    </plugin>
    
 </log4j:configuration>

This is my appender:

<appender name="UdpAppender" type="log4net.Appender.UdpAppender">
<localPort value="80" />
<remoteAddress value="127.0.0.1" />
<remotePort value="8080" />
<layout type="log4net.Layout.XmlLayoutSchemaLog4j">
<locationInfo value="true" />
</layout>
</appender>

I haven't tried Chainsaw v2.0 yet.

--- "Dietmar Winkler, T-AU" <Di...@tecan.com> wrote:

> Hi all,
> I need some help in configuring Chainsaw to display logging output
> from
> log4net
> I use the latest build from CVS for log4net and Chainsaw V2.0alpha
> 
> My appender in the log4net configuration file looks like that:
> 	<appender name="UdpAppenderChainsaw"
> type="log4net.Appender.UdpAppender">
> 		<param name="LocalPort" value="9999" />
> 		<param name="RemoteAddress" value="127.0.0.1" />
> 		<param name="RemotePort" value="4560" />
> 		<layout type="log4net.Layout.XmlLayoutSchemaLog4j">
> 		</layout>
> 	</appender>
> 
> ...and this works fine for a self-written logging-viewer which
> consumes this
> UDP stream (so I guess it�s not log4net�s fault, since the
> debug-output
> looks fine and shows no errors!)
> 
> I use the following configuration file for Chainsaw:
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> 
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> debug="true">
>      <plugin name="UDPReceiver"
> class="org.apache.log4j.net.UDPReceiver">
>         <param name="Port" value="4560" />
>      </plugin>
>  </log4j:configuration>
> 
> ...and in Chainsaw no logging requests are shown...
> 
> Does anybody out there have experience with configuring Chainsaw to
> consume
> logging events from log4net?
> ...and if so, how the hell did you to that?
> 
> 
> Best regards, Mit freundlichen Gr��en
>  
> Dietmar Winkler
> Software Engineer
>