Top Description Fields Constructors Methods
reactor.netty5.transport.logging

public final Enum AdvancedBufferFormat

extends Enum<AdvancedBufferFormat>
Class Inheritance
Imports
java.nio.charset.Charset, io.netty5.buffer.Buffer, io.netty5.handler.logging.LogLevel, .LoggingHandler

Used to control the format and verbosity of logging for Buffers.

Adds AdvancedBufferFormat#TEXTUAL format to io.netty5.handler.logging.BufferFormat.

Author
Maximilian Goeke
Since
1.0.0

Field Summary

Modifier and TypeField and Description
public static final AdvancedBufferFormat
HEX_DUMP

When wire logging is enabled with this format, both events and content will be logged.

public static final AdvancedBufferFormat
SIMPLE

When wire logging is enabled with this format, only the events will be logged.

public static final AdvancedBufferFormat
TEXTUAL

When wire logging is enabled with this format, both events and content will be logged.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public LoggingHandler

Returns:

a new LoggingHandler reference
toLoggingHandler
(String
the logger category
category
,
LogLevel
the logger level
level
,
Charset
the charset (only relevant for AdvancedBufferFormat#TEXTUAL)
charset
)

Creates the matching LoggingHandler regarding the format.

public static AdvancedBufferFormat
public static AdvancedBufferFormat[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

HEX_DUMPback to summary
public static final AdvancedBufferFormat HEX_DUMP

When wire logging is enabled with this format, both events and content will be logged. The content will be in hex format.

Examples:

reactor.netty5.http.HttpTests - [d5230a14, L:/0:0:0:0:0:0:0:1:60267 - R:/0:0:0:0:0:0:0:1:60269] REGISTERED
reactor.netty5.http.HttpTests - [d5230a14, L:/0:0:0:0:0:0:0:1:60267 - R:/0:0:0:0:0:0:0:1:60269] ACTIVE
reactor.netty5.http.HttpTests - [d5230a14, L:/0:0:0:0:0:0:0:1:60267 - R:/0:0:0:0:0:0:0:1:60269] READ: 145B
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 50 4f 53 54 20 2f 74 65 73 74 2f 57 6f 72 6c 64 |POST /test/World|
|00000010| 20 48 54 54 50 2f 31 2e 31 0d 0a 43 6f 6e 74 65 | HTTP/1.1..Conte|
|00000020| 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 70 6c |nt-Type: text/pl|
|00000030| 61 69 6e 0d 0a 75 73 65 72 2d 61 67 65 6e 74 3a |ain..user-agent:|
|00000040| 20 52 65 61 63 74 6f 72 4e 65 74 74 79 2f 64 65 | ReactorNetty/de|
...
reactor.netty5.http.HttpTests - [d5230a14, L:/0:0:0:0:0:0:0:1:60267 - R:/0:0:0:0:0:0:0:1:60269] WRITE: 38B
         +-------------------------------------------------+
         |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d |HTTP/1.1 200 OK.|
|00000010| 0a 63 6f 6e 74 65 6e 74 2d 6c 65 6e 67 74 68 3a |.content-length:|
|00000020| 20 30 0d 0a 0d 0a                               | 0....          |
+--------+-------------------------------------------------+----------------+

SIMPLEback to summary
public static final AdvancedBufferFormat SIMPLE

When wire logging is enabled with this format, only the events will be logged.

Examples:

reactor.netty5.http.HttpTests - [230d3686, L:/0:0:0:0:0:0:0:1:60241 - R:/0:0:0:0:0:0:0:1:60245] REGISTERED
reactor.netty5.http.HttpTests - [230d3686, L:/0:0:0:0:0:0:0:1:60241 - R:/0:0:0:0:0:0:0:1:60245] ACTIVE
reactor.netty5.http.HttpTests - [230d3686, L:/0:0:0:0:0:0:0:1:60241 - R:/0:0:0:0:0:0:0:1:60245] READ: 145B
reactor.netty5.http.HttpTests - [230d3686, L:/0:0:0:0:0:0:0:1:60241 - R:/0:0:0:0:0:0:0:1:60245] WRITE: 38B

TEXTUALback to summary
public static final AdvancedBufferFormat TEXTUAL

When wire logging is enabled with this format, both events and content will be logged. The content will be in plain text format.

Examples:

reactor.netty5.http.HttpTests - [02c3db6c, L:/0:0:0:0:0:0:0:1:60317 - R:/0:0:0:0:0:0:0:1:60319] REGISTERED
reactor.netty5.http.HttpTests - [02c3db6c, L:/0:0:0:0:0:0:0:1:60317 - R:/0:0:0:0:0:0:0:1:60319] ACTIVE
reactor.netty5.http.HttpTests - [02c3db6c, L:/0:0:0:0:0:0:0:1:60317 - R:/0:0:0:0:0:0:0:1:60319] READ: 145B POST /test/World HTTP/1.1
Content-Type: text/plain
user-agent: ReactorNetty/dev
...
reactor.netty5.http.HttpTests - [02c3db6c, L:/0:0:0:0:0:0:0:1:60317 - R:/0:0:0:0:0:0:0:1:60319] WRITE: 38B HTTP/1.1 200 OK
content-length: 0

Constructor Detail

AdvancedBufferFormatback to summary
private AdvancedBufferFormat()

Method Detail

toLoggingHandlerback to summary
public LoggingHandler toLoggingHandler(String category, LogLevel level, Charset charset)

Creates the matching LoggingHandler regarding the format.

Parameters
category:String

the logger category

level:LogLevel

the logger level

charset:Charset

the charset (only relevant for AdvancedBufferFormat#TEXTUAL)

Returns:LoggingHandler

a new LoggingHandler reference

valueOfback to summary
public static AdvancedBufferFormat valueOf(String name)
valuesback to summary
public static AdvancedBufferFormat[] values()