Writes GelfMessages to an UDP socket. More...
#include <GelfUDPOutput.hpp>
Public Member Functions | |
GelfUDPOutput (const std::string &host, uint16_t port) | |
Creates an new output socket to given host and port. More... | |
void | Write (const GelfMessage &message) |
Serializes a message to the UDP stream. More... | |
Writes GelfMessages to an UDP socket.
Serializes and sends messages to e.g. an Graylog Node, sending is non-blocking.
Uses chunking for big messages due to size limitations of UDP. Additionally uses compression if enabled (by setting GELFCPP_WITH_COMPRESSION
in CMake).
|
inline |
Creates an new output socket to given host and port.
host | remote hostname |
port | remote UDP port |
|
inline |
Serializes a message to the UDP stream.
message | the message |