此内容没有您所选择的语言版本。
Chapter 9. Logging
9.1. Configuring logging 复制链接链接已复制到粘贴板!
The client uses the SLF4J API, enabling users to select a particular logging implementation based on their needs. For example, users can provide the slf4j-log4j binding to select the Log4J implementation. More details on SLF4J are available from its website.
The client uses Logger names residing within the org.apache.qpid.jms hierarchy, which you can use to configure a logging implementation based on your needs.
9.2. Enabling protocol logging 复制链接链接已复制到粘贴板!
When debugging, it is sometimes useful to enable additional protocol trace logging from the Qpid Proton AMQP 1.0 library. There are two ways to achieve this.
-
Set the environment variable (not the Java system property)
PN_TRACE_FRMto1. When the variable is set to1, Proton emits frame logging to the console. -
Add the option
amqp.traceFrames=trueto your connection URI and configure theorg.apache.qpid.jms.provider.amqp.FRAMESlogger to log levelTRACE. This adds a protocol tracer to Proton and includes the output in your logs.
You can also configure the client to emit low-level tracing of input and output bytes. To enable this, add the option transport.traceBytes=true to your connection URI and configure the org.apache.qpid.jms.transports.netty.NettyTcpTransport logger to log level DEBUG.