gelfcpp::output::GelfUDPOutput Class Reference

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...
 

Detailed Description

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).

Constructor & Destructor Documentation

gelfcpp::output::GelfUDPOutput::GelfUDPOutput ( const std::string &  host,
uint16_t  port 
)
inline

Creates an new output socket to given host and port.

Parameters
hostremote hostname
portremote UDP port

Member Function Documentation

void gelfcpp::output::GelfUDPOutput::Write ( const GelfMessage message)
inline

Serializes a message to the UDP stream.

Parameters
messagethe message

The documentation for this class was generated from the following file: