public class GELFMessage extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GELFMessage.Type |
| Constructor and Description |
|---|
GELFMessage(byte[] payload) |
GELFMessage(byte[] payload,
ResolvableInetSocketAddress sourceAddress) |
| Modifier and Type | Method and Description |
|---|---|
GELFMessage.Type |
getGELFType() |
String |
getJSON()
Deprecated.
Use
getJSON(long). |
String |
getJSON(long maxBytes)
Return the JSON payload of the GELF message.
|
byte[] |
getPayload() |
ResolvableInetSocketAddress |
getSourceAddress() |
public GELFMessage(byte[] payload)
payload - Compressed or uncompressedGELFMessage.Typepublic GELFMessage(byte[] payload,
ResolvableInetSocketAddress sourceAddress)
public GELFMessage.Type getGELFType()
@Deprecated public String getJSON()
getJSON(long).public String getJSON(long maxBytes)
maxBytes - The maximum number of bytes to read from a compressed GELF payload. -1 means unlimited.Tools.decompressGzip(byte[], long),
Tools.decompressZlib(byte[], long)public byte[] getPayload()
@Nullable public ResolvableInetSocketAddress getSourceAddress()
Copyright © 2012–2021 Graylog, Inc.. All rights reserved.