You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Mark Womack <mw...@bevocal.com> on 2003/02/06 18:52:09 UTC

RE: questions related to config xml file

Nancy,

Can you give more detail of what you are trying to accomplish.  The
SocketHubAppender does not accept any configuration for the XMLAppender.  It
is just a mechanism to stuff the logging event over a socket to a remote
client.  The remote client would be responsible for setting up an
XMLAppender for output.

-Mark

> -----Original Message-----
> From: Nancy [mailto:logmail2003@softhome.net]
> Sent: Tuesday, December 10, 2002 11:54 AM
> To: Log4J Users List
> Subject: questions related to config xml file
> 
> 
> Hi:
> 
> I am implementing remote debugging using SocketHubAppender. I 
> want to use
> XML to write the configuration file. I read log4j.dtd, but not fully
> understand it. I guess because I am doing remote debugging, 
> so I need to
> config log4j:eventSet, and inside the element, there can be 0-many
> log4j:event elements.I tried to find an example on how to 
> config this, but
> unfortunatly, I didn't find. Could you help me on how to config the
> configuration file, or point me to a link where there is an 
> example. Thank
> you very much for your help.
> 
> regards,
> 
> Nancy
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 

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


Re: questions related to config xml file

Posted by Nancy <lo...@softhome.net>.
Hi,Mark:

Thank you so much for your reply.

Sorry for not providing enough information.

The following is the description of what I am attemping to accomplish:
We have developed a web application. Now I am developing a swing application
which is used to monitor some major activities (such as place orders, login,
logout and etc.) happened in the web application. The connection between the
swing application and the web application is initialized by the swing
application(I mean when a system admin clicks the connect button on the
swing user interface). After the connection is established, whenever users
login, logout, or place orders in the web application, the swing application
should IMMEDIATELY detects them, and display the appropriate message(Such as
"user has place an order", "user has login the web site"). After doing some
study on log4j api, we decided to use SocketHubAppender in the web
application to accomplish the senario.


I am using xml formate to config the configuration file. The following is
what I configured in the configuration file: (I omitted the parts that are
not related to the senario):
...
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
   .......
  <!-- for Activity monitor purpose.-->
    <!-- SocketHubAppender does not use a layout-->

    <appender name="SOCKET_HUB"
class="org.apache.log4j.net.SocketHubAppender">
       <param name="Port" value="7001"/>
    </appender>

    <root>
....
    <!-- for Activity monitor purpose. -->
      <appender-ref ref="SOCKET_HUB" />
    </root>

</log4j:configuration>


Question1:                   What else do I need to config in the
configuration file?
Question2:                    I ONLY want SOME activities to use
SocketHubAppender,  for instance, activities such as login, logout, place
orders. How should I do to limit the use of SocketHubAppender only to those
activities? We have already used logging mechnism for ALL activities for
general logging purpose(such as logging to file systems, console), and we
prefer those general logging still exist while add the use SocketHubAppender
for some activities.

I tried my best to make the senario and the questions clear. However,  I am
very glad to explain them in more detail  if you have any confuse.

Thank you very much for your reply.

Best regards,

Nancy




----- Original Message -----
From: "Mark Womack" <mw...@bevocal.com>
To: "'Log4J Users List'" <lo...@jakarta.apache.org>
Sent: Thursday, February 06, 2003 12:52 PM
Subject: RE: questions related to config xml file


> Nancy,
>
> Can you give more detail of what you are trying to accomplish.  The
> SocketHubAppender does not accept any configuration for the XMLAppender.
It
> is just a mechanism to stuff the logging event over a socket to a remote
> client.  The remote client would be responsible for setting up an
> XMLAppender for output.
>
> -Mark
>
> > -----Original Message-----
> > From: Nancy [mailto:logmail2003@softhome.net]
> > Sent: Tuesday, December 10, 2002 11:54 AM
> > To: Log4J Users List
> > Subject: questions related to config xml file
> >
> >
> > Hi:
> >
> > I am implementing remote debugging using SocketHubAppender. I
> > want to use
> > XML to write the configuration file. I read log4j.dtd, but not fully
> > understand it. I guess because I am doing remote debugging,
> > so I need to
> > config log4j:eventSet, and inside the element, there can be 0-many
> > log4j:event elements.I tried to find an example on how to
> > config this, but
> > unfortunatly, I didn't find. Could you help me on how to config the
> > configuration file, or point me to a link where there is an
> > example. Thank
> > you very much for your help.
> >
> > regards,
> >
> > Nancy
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>


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