You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ps...@apache.org on 2007/04/30 00:11:35 UTC
svn commit: r533568 - /logging/sandbox/jul-to-log4j-bridge/README.txt
Author: psmith
Date: Sun Apr 29 15:11:34 2007
New Revision: 533568
URL: http://svn.apache.org/viewvc?view=rev&rev=533568
Log:
Slight update to README.
Modified:
logging/sandbox/jul-to-log4j-bridge/README.txt
Modified: logging/sandbox/jul-to-log4j-bridge/README.txt
URL: http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/README.txt?view=diff&rev=533568&r1=533567&r2=533568
==============================================================================
--- logging/sandbox/jul-to-log4j-bridge/README.txt (original)
+++ logging/sandbox/jul-to-log4j-bridge/README.txt Sun Apr 29 15:11:34 2007
@@ -1,22 +1,35 @@
-Requirements: JDK 1.4+, and log4j 1.2.15
+Bridging support between the java.util.logging (JUL) framework and log4j.
-Bridging support between the java.util.logging framework and log4j.
+Requirements: JDK 1.4+, and log4j 1.2.15
-Key classes:
+This library will not work with log4j 1.2.14 or earlier.
- * org.apache.logging.julibridge.JuliLog4jBridge - main entry point to configure a bridge
+Key classes:
+ * org.apache.logging.julbridge.JULLog4jBridge - main entry point to configure a bridge
+ * org.apache.logging.julbridge.JULLevelConverter - Because the JUL Level classes are quite different
+ this converter interface performs the mapping into the log4j Level space. In
+ many cases you can use a default converter.
+
+Example 1 - Completely take over JUL and route all LogRecords into log4j
+========================================================================
+
+ JULLog4jBridge.assimilate();
+
+Example 2 - As (1), but using log4j XML configuration
+========================================================================
+
+ <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
+ <plugin name="julreceiver" class="org.apache.log4j.jul.JULReceiver" />
+ ......
+ </log4j:configuration>
-Examples:
+Example 2 - Bridge a single JUL Logger
+=======================================
- JuliLog4jBridge.bridgeJuliLogger("foo");
+ JULLog4jBridge.bridgeJULLogger("foo");
This bridges all events posted to the 'foo' logger into log4j's Logger called 'foo'.
- NOTE: this does NOT automatically bridge child Loggers. Currenty one must bridge each Logger you require.
+ NOTE: this does NOT automatically bridge child Loggers.
-TODO
- * LocationInfo is not working at this time
- * Create an automatic bridge, non-daemon thread that polls the juli Logger
- hierarchy and automatically bridges them.
- * Tidy up of the Maven pom.xml - it's quite copy/pasted
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org