4#include <stumpless/entry.h>
5#include <stumpless/Facility.hpp>
6#include <stumpless/Severity.hpp>
7#include <stumpless/Entry.hpp>
8#include <stumpless/Element.hpp>
10#include <stumpless/Param.hpp>
46 Entry(
Facility facility,
Severity severity,
const char *app_name,
const char *msgid,
const char *message, ... );
56 Entry(
struct stumpless_entry *entry );
117 Entry&
AddParam(
const char *element_name,
const char *param_name,
const char *param_value );
255 const char *
GetParamValue(
const char *element_name,
const char *param_name );
An element of structured data.
Definition Element.hpp:15
A log entry.
Definition Entry.hpp:19
Entry(const Entry &entry)
Creates an Entry as a copy of another Entry.
const char * GetMsgid(void)
Gets the msgid of this Entry.
Entry & SetFacility(Facility facility)
Sets the Facility of this Entry.
Entry & AddElement(Element *element)
Adds an Element to this Entry.
const char * GetParamValue(const char *element_name, const char *param_name)
Gets the value of the first Param from the Element with the given name from this Entry.
size_t GetElementIndex(const char *name)
Gets the index of the Element with the given name from this Entry.
Entry & SetMsgid(const char *msgid)
Sets the msgid for this Entry.
Entry & SetElement(size_t index, Element &element)
Puts the element at the given index in this Entry.
Entry & SetMessage(const char *message,...)
Sets the message of an Entry.
Param GetParam(size_t element_index, size_t param_index)
Gets the Param from the Element at the given index from this Entry.
size_t GetElementCount(void)
Returns the number of elements in this Entry.
Entry(Facility facility, Severity severity, const char *app_name, const char *msgid, const char *message,...)
Creates an Entry with the given properties.
const char * GetMessage(void)
Gets the message from this Entry.
Severity GetSeverity(void)
Gets the Severity of this Entry.
struct stumpless_entry * equivalent
Definition Entry.hpp:22
Entry & SetPrival(int prival)
Sets the prival of this Entry, as defined in RFC 5424.
Element GetElement(size_t index)
Gets the Element at the given index in this Entry.
Entry & SetPriority(Facility facility, Severity severity)
Sets the Facility and Severity of this Entry.
Entry & SetParamValue(size_t element_index, size_t param_index, const char *value)
Sets the value of the Param in the Element at the given index of this Entry.
bool HasElement(const char *name)
True if this Entry has an Element with the given name, false otherwise.
~Entry(void)
Destroys the Entry and frees any memory allocated for it.
Entry & SetParamValue(const char *element_name, const char *param_name, const char *value)
Sets the value of the first Param with the given name in the Element with the given name in this Entr...
Entry & SetSeverity(Severity severity)
Sets the Severity of this Entry.
const char * GetParamValue(size_t element_index, size_t param_index)
Gets the value of the Param from the Element at the given index from this Entry.
Entry & SetAppName(const char *app_name)
Sets the app name for an entry.
int GetPrival(void)
Gets the prival of this Entry, as defined in RFC 5424.
Entry & AddParam(const char *element_name, const char *param_name, const char *param_value)
Creates a new Param and adds it to the specified Element in this Entry.
Entry(struct stumpless_entry *entry)
Creates an Entry from a stumpless_entry struct.
Element GetElement(const char *name)
Gets the Element with the given name from this Entry.
Entry & AddElement(Element &element)
Adds an element to an entry.
Entry & SetParam(size_t element_index, size_t param_index, Param ¶m)
Puts the Param in the Element at the given index of this Entry.
Param GetParam(const char *element_name, const char *param_name)
Gets the first Param from the Element with the given name from this Entry.
Entry & AddElement(const char *name)
Creates a new Element and adds it to this Entry.
Facility GetFacility(void)
Gets the Facility of this Entry.
const char * GetAppName(void)
Gets the app name from this Entry.
A parameter within a structured data element.
Definition Param.hpp:12
Definition AddressFailure.hpp:7
Facility
Facilities (as defined in RFC 5424) describe the general classification of an event.
Definition Facility.hpp:17
Severity
Severities (as defined in RFC 5424) describe the level of importance of a given log entry.
Definition Severity.hpp:15