[hornetq-commits] JBoss hornetq SVN: r9200 - branches/HnetQ_323_cn/docs/user-manual/zh.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed May 5 04:24:45 EDT 2010
Author: gaohoward
Date: 2010-05-05 04:24:45 -0400 (Wed, 05 May 2010)
New Revision: 9200
Modified:
branches/HnetQ_323_cn/docs/user-manual/zh/logging.xml
Log:
done
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/logging.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/logging.xml 2010-05-05 08:00:38 UTC (rev 9199)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/logging.xml 2010-05-05 08:24:45 UTC (rev 9200)
@@ -17,39 +17,30 @@
<!-- permitted by applicable law. -->
<!-- ============================================================================= -->
<chapter id="logging">
- <title>Logging</title>
- <para>HornetQ has its own logging delegate that has no dependencies on any particular logging
- framework. The default delegate delegates all its logs to the standard <ulink
- url="http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/">JDK logging</ulink>,
- (a.k.a Java-Util-Logging: JUL). By default the server picks up its JUL configuration from a
- <literal>logging.properties</literal> file found in the config directories. This is
- configured to use our own HornetQ logging formatter and will log to the console as well as a
- log file. For more information on configuring JUL visit Suns website.</para>
- <para>You can configure a different Logging Delegate programatically or via a System
- Property.</para>
- <para>To do this programatically simply do the
- following<programlisting>org.hornetq.core.logging.Logger.setDelegateFactory(new Log4jLogDelegateFactory())</programlisting></para>
- <para>Where <literal>Log4jLogDelegateFactory</literal> is the implementation of <literal
- >org.hornetq.spi.core.logging.LogDelegateFactory </literal>that you would like to
- use.</para>
- <para>To do this via a System Property simply set the property <literal
- >org.hornetq.logger-delegate-factory-class-name</literal> to the delegate factory being
- used,
- i.e.<programlisting>-Dorg.hornetq.logger-delegate-factory-class-name=org.hornetq.integration.logging.Log4jLogDelegateFactory</programlisting></para>
- <para>As you can see in the above example HornetQ provides some Delegate Factories for your
- convenience. these are<orderedlist
- ><listitem><para>org.hornetq.core.logging.impl.JULLogDelegateFactory - the
- default that uses
- JUL.</para></listitem><listitem><para>org.hornetq.integration.logging.Log4jLogDelegateFactory
- - which uses Log4J</para></listitem></orderedlist></para>
- <para>If you configure your client's logging to use the JUL delegate, make sure you provide a
- <literal>logging.properties</literal> file and set the <literal
- >java.util.logging.config.file</literal> property on client startup</para>
+ <title>日志(Logging)</title>
+ <para>HornetQ有自己的独立的日志系统,不依赖于任何其它的日志框架。在默认情况下所有HornetQ的日志将输入到
+ 标准的<ulink
+ url="http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/">JDK日志系统</ulink>,
+ (即JUL-Java Util Logging)。服务器在默认条件下读取config目录下的
+ <literal>logging.properties</literal>文件做为JUL的配置文件。它配置了使用HornetQ自己的格式化
+ 方法,将日志输出到屏幕终端(Console)及文件中。请访问Sun公司的相关网址来进一步了解如何配置使用JUL。</para>
+ <para>你可以通过编程或定义系统变量的方法来配置不同的日志代理(Logging Delegate)。</para>
+ <para>采用编程方法,只需要调用方法:
+ <programlisting>org.hornetq.core.logging.Logger.setDelegateFactory(new Log4jLogDelegateFactory())</programlisting></para>
+ <para>其中<literal>Log4jLogDelegateFactory</literal>实现了<literal
+ >org.hornetq.spi.core.logging.LogDelegateFactory </literal>接口。</para>
+ <para>如果要使用系统变量方法,则需要设置变量<literal
+ >org.hornetq.logger-delegate-factory-class-name</literal>为相应的代理工厂,即
+ <programlisting>-Dorg.hornetq.logger-delegate-factory-class-name=org.hornetq.integration.logging.Log4jLogDelegateFactory</programlisting></para>
+ <para>上面的例子可以看出HornetQ提供了一些代理工厂以方便用户使用,它们是:<orderedlist
+ ><listitem><para>org.hornetq.core.logging.impl.JULLogDelegateFactory - 默认的JUL日志代理工厂。</para>
+ </listitem><listitem><para>org.hornetq.integration.logging.Log4jLogDelegateFactory
+ - Log4J的日志代理工厂。</para></listitem></orderedlist></para>
+ <para>如果在客户端使用JUL代理,注意要提供<literal>logging.properties</literal>文件,并且在客户端启动之前设置<literal
+ >java.util.logging.config.file</literal>属性。</para>
<section>
- <title>Logging With The JBoss Application Server</title>
- <para>When HornetQ is deployed within the JBoss Application Server version 5.x or above then
- it will still use JUL however the logging is redirected to the default JBoss logger. For
- more information on this refer to the JBoss documentation. In versions before this you
- must specify what logger delegate you want to use.</para>
+ <title>与JBoss应用服务器日志的关系</title>
+ <para>当HornetQ部署到JBoss应用服务器版本5.x或以上时,虽然HornetQ仍然使用JUL,但是所有的日志输出被重定向到
+ JBoss logger。请参阅相关的JBoss文档来了解更多的信息。如果是以前版本的JBoss,则必需指定你所需要的日志代理。</para>
</section>
</chapter>
More information about the hornetq-commits
mailing list