logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konduru, Geetha" <Geetha_Kond...@medco.com>
Subject RE: Chain saw socket appender
Date Wed, 14 Sep 2011 14:29:37 GMT
Sorry, it is not working  for me...

Case1:-I used exactly following configuration,

<appender name="SOCKET1" class="org.apache.log4j.net.SocketAppender">
  <param name="Port" value="12346"/>
  <param name="RemoteHost" value="localhost"/>
  <param name="Application" value="app1"/>
  <param name="ReconnectionDelay" value="60000"/>
  <param name="Threshold" value="ALL"/>
</appender>

On chainsaw I used following configuration

<plugin name="MyReceiver1" class="org.apache.log4j.net.SocketReceiver">
      <param name="Port" value="12346"/>
      <param  name="Threshold" value="ALL"/>
</plugin>


In chainsaw I see a tab with name "localhost- ",not "localhost-app1"



Case 2:-

  One instance of an application is running with following
configuration.
 <appender name="SOCKET1" class="org.apache.log4j.net.SocketAppender">
  <param name="Port" value="12346"/>
  <param name="RemoteHost" value="localhost"/>
  <param name="Application" value="app1"/>
  <param name="ReconnectionDelay" value="60000"/>
  <param name="Threshold" value="ALL"/>
</appender>


Second instance of same application is running with following
configuration


<appender name="SOCKET2" class="org.apache.log4j.net.SocketAppender">
  <param name="Port" value="12346"/>
  <param name="RemoteHost" value="localhost"/>
  <param name="Application" value="app2"/>
  <param name="ReconnectionDelay" value="60000"/>
  <param name="Threshold" value="ALL"/>
</appender>


On chainsaw I used following configuration

<plugin name="MyReceiver1" class="org.apache.log4j.net.SocketReceiver">
      <param name="Port" value="12346"/>
      <param  name="Threshold" value="ALL"/>
</plugin>


STILL I see one tab with name "localhost- " and loggingevents from two
different Process are shown in one tab.



Would you please tell me as where I am going wrong.


Thanks a lot,
VGSS




-----Original Message-----
From: Scott Deboy [mailto:scott.deboy@gmail.com] 
Sent: Wednesday, September 14, 2011 1:54 AM
To: Log4J Users List
Subject: Re: Chain saw socket appender

Since log4j 1.2.15, the socket-based appenders have an 'application'
parameter that can be set which will result in an additional application
property being set on each event, which will then be used by Chainsaw to
route events to the correct tab.

The following example will result in events being routed to a tab called
'localhost-app1':

<appender name="SOCKET1" class="org.apache.log4j.net.SocketAppender">
  <param name="Port" value="12346"/>
  <param name="RemoteHost" value="localhost"/>
  <param name="Application" value="app1"/>
  <param name="ReconnectionDelay" value="60000"/>
  <param name="Threshold" value="ALL"/>
</appender>

By default, events are routed to tabs by resolving the hostname and
application event properties.  The tab/name event routing expression is
configurable via the application-wide preferences dialog.

Scott


On Tue, Sep 13, 2011 at 6:22 AM, Konduru, Geetha
<Geetha_Konduru@medco.com>wrote:

> Hi,
>
>
>
>
>
> 1. Following is how my   SocketAppender  configured.
>
>
>
>
>
>  <appender name="SOCKET1" class="org.apache.log4j.net.SocketAppender">
>
>      <param name="Port" value="12346"/>
>
>      <param name="RemoteHost" value="localhost"/>
>
>      <param name="ReconnectionDelay" value="60000"/>
>
>      <param name="Threshold" value="ALL"/>
>
>   </appender>
>
>
>
>
>
>
>
> 2. Following is how my SocketReceiver is configured.
>
>
>
>
>
>         <plugin name="MyReceiver1"
> class="org.apache.log4j.net.SocketReceiver">
>
>  <       <param name="Port" value="12346" />
>
>  <        <param name="name" value="Server-1" />
>
>  <         <param name="Threshold" value="ALL" />
>
>  </plugin>
>
>
>
>
>
>                By this in chainsaw I am getting a Tabbed Pane  with
> name as "localhost-", but what I am looking for is a Tabbed Pane with
> name "localhost-AppName".
>
>
>
> Please let me know what changes should I do to get, Tabbed Pane name
as
> "localhost-AppName".
>
>
>
>
>
>
>
> Thank U,
>
> vgss
>
> **********************************************************************
> This e-mail message and any attachments contain confidential
information
> from Medco. If you are not the intended recipient, you are hereby
notified
> that disclosure, printing, copying, distribution, or the taking of any
> action in reliance on the contents of this electronic information is
> strictly prohibited. If you have received this e-mail message in
error,
> please immediately notify the sender by reply message and then delete
the
> electronic message and any attachments.
>

**********************************************************************
This e-mail message and any attachments contain confidential information from Medco. If you
are not the intended recipient, you are hereby notified that disclosure, printing, copying,
distribution, or the taking of any action in reliance on the contents of this electronic information
is strictly prohibited. If you have received this e-mail message in error, please immediately
notify the sender by reply message and then delete the electronic message and any attachments.

---------------------------------------------------------------------
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