logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <paul.sm...@lawlex.com.au>
Subject Re: Start Chainsaw with SocketAppender as default
Date Thu, 26 Feb 2004 20:37:47 GMT
On Thu, 2004-02-26 at 21:19, Tormod Omholt-Jensen wrote:
> How can I make Chainsaw2 automatically creating a SocketReciever  at startup.
> 
> 
> Regards Tormod Omholt-Jensen

A trick I use at the moment is to specify the receivers in xml, and when
Chainsawv2 starts and complains that there are no Receivers, I use the
"Let me search for a configuration file" and browse to the xml file I
have created.  Next time you start up Chainsawv2, that xml file will be
remembered and easily accessible via the MRU drop down next to the
browse button.

If on startup Chainsawv2 does not have the No Receivers warning dialog,
you can (re)enable it via the application preferences, and tick the
"Prompt me on startup if there are no Receivers defined"

Makes life a lot easier if you have a standard config.  Here's my config
file so you can see how it's done (if you want to use a SocketReceiver
instead, it should be easy to see how to change that):

<?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="Falcon" class="org.apache.log4j.net.SocketHubReceiver">
      <param name="Port" value="4445"/>
	<param name="Host" value="lcs-falcon"/>
	<param name="ReconnectionDelay" value="5000"/>
   </plugin>

   <plugin name="LocalHost"
class="org.apache.log4j.net.SocketHubReceiver">
      <param name="Port" value="4445"/>
	<param name="Host" value="localhost"/>
	<param name="ReconnectionDelay" value="5000"/>
   </plugin>

      <plugin name="W2k (Xwing)"
class="org.apache.log4j.net.SocketHubReceiver">
      <param name="Port" value="4445"/>
	<param name="Host" value="lcs-xwing"/>
	<param name="ReconnectionDelay" value="5000"/>
   </plugin>


   <root>
      <level value="debug"/>
   </root>
</log4j:configuration>



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message