19.5. 为 subsystem 和 Services 日志记录

概述

您可以使用 “在独立软件包中配置日志记录”一节 中描述的 com.xyz.foo.level 配置属性来为指定的 Apache CXF 日志记录子系统设置精细的日志记录。

Apache CXF 日志记录子系统

表 19.2 “Apache CXF Logging 子系统” 显示可用 Apache CXF 日志记录子系统列表。

表 19.2. Apache CXF Logging 子系统

子系统描述

org.apache.cxf.aegis

Aegis binding

org.apache.cxf.binding.coloc

colocated binding

org.apache.cxf.binding.http

HTTP 绑定

org.apache.cxf.binding.jbi

JBI 绑定

org.apache.cxf.binding.object

Java 对象绑定

org.apache.cxf.binding.soap

SOAP 绑定

org.apache.cxf.binding.xml

XML 绑定

org.apache.cxf.bus

Apache CXF 总线

org.apache.cxf.configuration

配置框架

org.apache.cxf.endpoint

服务器和客户端端点

org.apache.cxf.interceptor

拦截器

org.apache.cxf.jaxws

用于 JAX-WS 风格的消息交换的前端、JAX-WS 处理程序处理以及与 JAX-WS 和配置相关的拦截器

org.apache.cxf.jbi

JBI 容器集成类

org.apache.cxf.jca

JCA 容器集成类

org.apache.cxf.js

JavaScript 前端

org.apache.cxf.transport.http

HTTP 传输

org.apache.cxf.transport.https

使用 HTTPS 保护 HTTP 传输的安全版本

org.apache.cxf.transport.jbi

JBI 传输

org.apache.cxf.transport.jms

JMS 传输

org.apache.cxf.transport.local

使用本地文件系统的传输实现

org.apache.cxf.transport.servlet

HTTP 传输和 servlet 实现,用于将 JAX-WS 端点加载到 servlet 容器中

org.apache.cxf.ws.addressing

WS-寻址实施

org.apache.cxf.ws.policy

ws-Policy 的实现

org.apache.cxf.ws.rm

ws-ReliableMessaging(WS-RM)实施

org.apache.cxf.ws.security.wss4j

WSS4J 安全实施

示例

WS-Addressing 示例包含在 InstallDir/samples/ws_addressing 目录中。日志记录在位于该目录中的 logging.properties 文件中配置。配置的相关行显示在 例 19.9 “为 WS-Addressing 配置日志记录” 中。

例 19.9. 为 WS-Addressing 配置日志记录

java.util.logging.ConsoleHandler.formatter = demos.ws_addressing.common.ConciseFormatter
...
org.apache.cxf.ws.addressing.soap.MAPCodec.level = INFO

例 19.9 “为 WS-Addressing 配置日志记录” 中的配置启用跳过与 WS-Addressing 标头相关的日志消息,并以简洁的形式将它们显示到控制台中。

有关运行此示例的详情,请查看 InstallDir/samples/ws_addressing 目录中的 README.txt 文件。