Skip to content

Latest commit

 

History

History
64 lines (51 loc) · 1.95 KB

wire-logger.adoc

File metadata and controls

64 lines (51 loc) · 1.95 KB

Wire Logger

Reactor Netty provides wire logging for when the traffic between the peers needs to be inspected. By default, wire logging is disabled. To enable it, you must set the logger {wirelogger} level to DEBUG and apply the following configuration:

{examplesdir}/wiretap/Application.java
link:{examplesdir}/wiretap/Application.java[role=include]
  1. Enables the wire logging

Wire Logger formatters

Reactor Netty supports 3 different formatters:

  • {javadoc}/reactor/netty/transport/logging/AdvancedByteBufFormat.html#HEX_DUMP[AdvancedByteBufFormat#HEX_DUMP] - the default

{sourcedir}/reactor/netty/transport/logging/AdvancedByteBufFormat.java
link:./../../reactor-netty-core/src/main/java/reactor/netty/transport/logging/AdvancedByteBufFormat.java[role=include]
  • {javadoc}/reactor/netty/transport/logging/AdvancedByteBufFormat.html#SIMPLE[AdvancedByteBufFormat#SIMPLE]

{sourcedir}/reactor/netty/transport/logging/AdvancedByteBufFormat.java
link:./../../reactor-netty-core/src/main/java/reactor/netty/transport/logging/AdvancedByteBufFormat.java[role=include]
  • {javadoc}/reactor/netty/transport/logging/AdvancedByteBufFormat.html#TEXTUAL[AdvancedByteBufFormat#TEXTUAL]

{sourcedir}/reactor/netty/transport/logging/AdvancedByteBufFormat.java
link:./../../reactor-netty-core/src/main/java/reactor/netty/transport/logging/AdvancedByteBufFormat.java[role=include]

When you need to change the default formatter you can configure it as follows:

{examplesdir}/wiretap/custom/Application.java
link:{examplesdir}/wiretap/custom/Application.java[role=include]
  1. Enables the wire logging, {javadoc}/reactor/netty/transport/logging/AdvancedByteBufFormat.html#TEXTUAL[AdvancedByteBufFormat#TEXTUAL] is used for printing the content.