public enum AdvancedByteBufFormat extends Enum<AdvancedByteBufFormat>
ByteBuf
s and ByteBufHolder
s.
Adds TEXTUAL
format to io.netty.handler.logging.ByteBufFormat.
Enum Constant and Description |
---|
HEX_DUMP
When wire logging is enabled with this format, both events and content will be logged.
|
SIMPLE
When wire logging is enabled with this format, only the events will be logged.
|
TEXTUAL
When wire logging is enabled with this format, both events and content will be logged.
|
Modifier and Type | Method and Description |
---|---|
LoggingHandler |
toLoggingHandler(String category,
LogLevel level,
Charset charset)
Creates the matching LoggingHandler regarding the format.
|
static AdvancedByteBufFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AdvancedByteBufFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AdvancedByteBufFormat SIMPLE
Examples:
reactor.netty.http.HttpTests - [id: 0x230d3686, L:/0:0:0:0:0:0:0:1:60241 - R:/0:0:0:0:0:0:0:1:60245] REGISTERED
reactor.netty.http.HttpTests - [id: 0x230d3686, L:/0:0:0:0:0:0:0:1:60241 - R:/0:0:0:0:0:0:0:1:60245] ACTIVE
reactor.netty.http.HttpTests - [id: 0x230d3686, L:/0:0:0:0:0:0:0:1:60241 - R:/0:0:0:0:0:0:0:1:60245] READ: 145B
reactor.netty.http.HttpTests - [id: 0x230d3686, L:/0:0:0:0:0:0:0:1:60241 - R:/0:0:0:0:0:0:0:1:60245] WRITE: 38B
public static final AdvancedByteBufFormat HEX_DUMP
Examples:
reactor.netty.http.HttpTests - [id: 0xd5230a14, L:/0:0:0:0:0:0:0:1:60267 - R:/0:0:0:0:0:0:0:1:60269] REGISTERED
reactor.netty.http.HttpTests - [id: 0xd5230a14, L:/0:0:0:0:0:0:0:1:60267 - R:/0:0:0:0:0:0:0:1:60269] ACTIVE
reactor.netty.http.HttpTests - [id: 0xd5230a14, 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.netty.http.HttpTests - [id: 0xd5230a14, 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.... |
+--------+-------------------------------------------------+----------------+
public static final AdvancedByteBufFormat TEXTUAL
Examples:
reactor.netty.http.HttpTests - [id: 0x02c3db6c, L:/0:0:0:0:0:0:0:1:60317 - R:/0:0:0:0:0:0:0:1:60319] REGISTERED
reactor.netty.http.HttpTests - [id: 0x02c3db6c, L:/0:0:0:0:0:0:0:1:60317 - R:/0:0:0:0:0:0:0:1:60319] ACTIVE
reactor.netty.http.HttpTests - [id: 0x02c3db6c, 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.netty.http.HttpTests - [id: 0x02c3db6c, 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
public static AdvancedByteBufFormat[] values()
for (AdvancedByteBufFormat c : AdvancedByteBufFormat.values()) System.out.println(c);
public static AdvancedByteBufFormat valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic LoggingHandler toLoggingHandler(String category, LogLevel level, Charset charset)
category
- the logger categorylevel
- the logger levelcharset
- the charset (only relevant for TEXTUAL
)LoggingHandler
reference