logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Deboy" <sde...@comotivsystems.com>
Subject RE: java.util.logging interoperability
Date Wed, 18 Feb 2004 18:01:30 GMT
Glad you asked!

Interoperability with jdk1.4 will be available with the 1.3 release of
Log4j - currently in CVS.

On the JDK1.4 side, configure your loggers with a SocketHandler and the
default XMLFormatter.

On the log4j side, receive the events using Chainsaw v2.

Here is an example receiver configuration which can receive the jdk1.4
util.logging events:

<?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="UtilLoggingSocketReceiver"
class="org.apache.log4j.net.XMLSocketReceiver">
     <param name="Port" value="4448"/>
     <param name="decoder"
value="org.apache.log4j.xml.UtilLoggingXMLDecoder"/>
   </plugin>
   <root>
      <level value="debug"/>
   </root>
</log4j:configuration>

You can get the latest version of Chainsaw (and Log4J) using an ant
script Paul Smith wrote, available from the 'installation' section of
this page: http://logging.apache.org/log4j/docs/chainsaw.html

Let me know if you have further questions.

Scott

-----Original Message-----
From: Terry Henning [mailto:Terry_Henning@avid.com] 
Sent: Wednesday, February 18, 2004 9:55 AM
To: log4j-user@jakarta.apache.org
Subject: java.util.logging interoperability


I'll start off this message with my defense.  I can't help but think
this *must* have come up before, but for whatever reason (my poor
searching skills?) I'm unable to find a solution in the archives.  I've
spent the last three hours searching on Google (web and Usenet), the
Log4J API documentation, samples and mailing list archives and while
I've found discussions that talk around what I'm trying to accomplish,
I've not found exactly what I'm looking for.

So, I put my heart on my sleeve and ask the community for help and duck
while the "OMG!  That's been asked a million times already!  Don't you
ever search?" responses fly by.

--
The page at http://logging.apache.org states:

	"... we currently have inter-operability between the following
projects: 
		[stuff deleted...]
		JDK1.4's util.logging framework "

What exactly does "inter-operability" mean here in the context of JDK
1.4 java.util.logging and Log4J 1.2.8?  I'm thinking it means that Log4J
can handle any log items that are generated by Java's java.util.logging
statements.  Is that correct?

If so, how does one go about configuring Log4J to receive JDK logs?

I'm working on a project which needs to provide diagnostic logging in
Java.  We are using Log4J in all of the code we write.  However, we are
using Java libraries that were not written by us which use the standard
java.util.logging.  We need to be able to combine the logging so that it
acts as if it were all one framework.

Any pointers?  I'd be very happy with a URL, and ecstatic with an
example.  I have a moderate understanding of both java.util.logging and
Log4J.

Thanks!
Terry


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


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