Show Table of Contents
20.6.4. 为 HornetQ 启用日志
您可以用下列途径在 EAP 6.x 里为 HornetQ 启用日志:
- 手动编辑服务器配置文件(
standalone-full.xml和standalone-full-ha.xml) - 用 CLI 编辑服务器配置文件
过程 20.1. 手动编辑服务器配置文件来设置 HornetQ 日志
- 打开服务器配置文件进行编辑。 例如:
standalone-full.xml和standalone-full-ha.xml - 进入文件里的日志子系统配置部分。默认的配置类似于:
<logger category="com.arjuna"> <level name="TRACE"/> </logger> ... <logger category="org.apache.tomcat.util.modeler"> <level name="WARN"/> </logger> ....
- 添加下例所示的
org.hornetqlogger 类别已及想要的日志级别:<logger category="com.arjuna"> <level name="TRACE"/> </logger> ... <logger category="org.hornetq"> <level name="INFO"/> </logger> ....
结果
HornetQ 日志已启用且根据配置的日志级别处理日志信息。
用 CLI 编辑服务器配置文件来设置 HornetQ 日志
您也可以使用 CLI 来添加 org.hornetq logger 类别已及想要的日志级别到服务器配置文件里。更多信息请参考 第 14.3.2 节 “在 CLI 里配置日志类别”。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.