57 const char *
const syslog_msg,
58 const char *
const syslog_tag)
67 assert(syslog_msg != NULL);
68 assert(syslog_tag != NULL);
119 const char *
const type)
126 assert(syslog != NULL);
158 assert(syslog != NULL);
160 assert(name != NULL);
161 assert(value != NULL);
163 EVEL_DEBUG(
"Adding name=%s value=%s", name, value);
165 assert(addl_field != NULL);
167 addl_field->
name = strdup(name);
168 addl_field->
value = strdup(value);
169 assert(addl_field->
name != NULL);
170 assert(addl_field->
value != NULL);
190 const char *
const host)
197 assert(syslog != NULL);
199 assert(host != NULL);
203 "Event Source Host");
227 assert(syslog != NULL);
255 assert(syslog != NULL);
257 assert(proc != NULL);
281 assert(syslog != NULL);
309 assert(syslog != NULL);
311 assert(version >= 0);
338 assert(syslog != NULL);
340 assert(s_data != NULL);
366 assert(event != NULL);
389 bool item_added =
false;
392 while (addl_field_item != NULL)
395 assert(addl_field != NULL);
474 assert(event != NULL);
481 while (addl_field != NULL)
483 EVEL_DEBUG(
"Freeing Additional Field (%s, %s)",
486 free(addl_field->
name);
487 free(addl_field->
value);
void evel_init_option_int(EVEL_OPTION_INT *const option)
Initialize an EVEL_OPTION_INT to a not-set state.
void evel_set_option_string(EVEL_OPTION_STRING *const option, const char *const value, const char *const description)
Set the value of an EVEL_OPTION_STRING.
#define EVEL_DEBUG(FMT,...)
DLIST_ITEM * dlist_get_first(DLIST *list)
void evel_set_option_int(EVEL_OPTION_INT *const option, const int value, const char *const description)
Set the value of an EVEL_OPTION_INT.
EVEL_OPTION_STRING syslog_s_data
void evel_syslog_proc_id_set(EVENT_SYSLOG *syslog, int proc_id)
Set the Process ID property of the Syslog.
EVEL_SOURCE_TYPES event_source_type
The type of equipment represented by this VNF.
EVEL_OPTION_INT syslog_ver
void dlist_initialize(DLIST *list)
List initialization.
EVEL_THROTTLE_SPEC * throttle_spec
EVEL_OPTION_INT syslog_facility
EVENT_SYSLOG * evel_new_syslog(EVEL_SOURCE_TYPES event_source_type, const char *const syslog_msg, const char *const syslog_tag)
Create a new Syslog event.
void evel_json_close_list(EVEL_JSON_BUFFER *jbuf)
Add the closing bracket of a list to a JSON buffer.
void evel_init_option_string(EVEL_OPTION_STRING *const option)
Initialize an EVEL_OPTION_STRING to a not-set state.
void evel_syslog_addl_field_add(EVENT_SYSLOG *syslog, char *name, char *value)
Add an additional value name/value pair to the Syslog.
EVEL_OPTION_STRING syslog_proc
void evel_syslog_facility_set(EVENT_SYSLOG *syslog, EVEL_SYSLOG_FACILITIES facility)
Set the Facility property of the Syslog.
void evel_syslog_version_set(EVENT_SYSLOG *syslog, int version)
Set the Version property of the Syslog.
char * evel_source_type(const EVEL_SOURCE_TYPES source_type)
Map an EVEL_SOURCE_TYPES enum value to the equivalent string.
void evel_enc_kv_string(EVEL_JSON_BUFFER *jbuf, const char *const key, const char *const value)
Encode a string key and string value to a EVEL_JSON_BUFFER.
void evel_json_close_object(EVEL_JSON_BUFFER *jbuf)
Add the closing bracket of an object to a JSON buffer.
void evel_free_syslog(EVENT_SYSLOG *event)
Free a Syslog.
#define EVEL_SYSLOG_MINOR_VERSION
EVEL_SOURCE_TYPES
Fault source types.
void evel_json_open_named_object(EVEL_JSON_BUFFER *jbuf, const char *const key)
Add the opening bracket of an object to a JSON buffer.
void evel_json_open_object(EVEL_JSON_BUFFER *jbuf)
Add the opening bracket of an object to a JSON buffer.
EVEL_SYSLOG_FACILITIES
Syslog facilities.
void evel_json_checkpoint(EVEL_JSON_BUFFER *jbuf)
Add a checkpoint - a stake in the ground to which we can rewind.
void evel_syslog_event_source_host_set(EVENT_SYSLOG *syslog, const char *const host)
Set the Event Source Host property of the Syslog.
EVEL_OPTION_INT syslog_proc_id
void evel_json_encode_header(EVEL_JSON_BUFFER *jbuf, EVENT_HEADER *event)
Encode the event as a JSON event object according to AT&T's schema.
void evel_free_header(EVENT_HEADER *const event)
Free an event header.
void evel_syslog_type_set(EVENT_SYSLOG *syslog, const char *const type)
Set the Event Type property of the Syslog.
void * dlist_pop_last(DLIST *list)
void dlist_push_last(DLIST *list, void *item)
bool evel_json_open_opt_named_list(EVEL_JSON_BUFFER *jbuf, const char *const key)
Add the key and opening bracket of an optional named list to a JSON buffer.
void log_error_state(char *format,...)
#define EVEL_CT_ASSERT(X)
Compile-time assertion.
void evel_free_option_string(EVEL_OPTION_STRING *const option)
Free the underlying resources of an EVEL_OPTION_STRING.
void evel_syslog_s_data_set(EVENT_SYSLOG *syslog, const char *const s_data)
Set the Structured Data property of the Syslog.
bool evel_enc_kv_opt_string(EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_STRING *const option)
Encode a string key and string value to a EVEL_JSON_BUFFER.
DLIST_ITEM * dlist_get_next(DLIST_ITEM *item)
bool evel_enc_kv_opt_int(EVEL_JSON_BUFFER *jbuf, const char *const key, const EVEL_OPTION_INT *const option)
Encode a string key and integer value to a EVEL_JSON_BUFFER.
void evel_json_rewind(EVEL_JSON_BUFFER *jbuf)
Rewind to the latest checkoint.
void evel_header_type_set(EVENT_HEADER *const header, const char *const type)
Set the Event Type property of the event header.
EVEL throttle definitions.
void evel_enc_version(EVEL_JSON_BUFFER *jbuf, const char *const key, const int major_version, const int minor_version)
Encode a key and version.
void evel_init_header(EVENT_HEADER *const header)
Initialize a newly created event header.
bool evel_throttle_suppress_nv_pair(EVEL_THROTTLE_SPEC *throttle_spec, const char *const field_name, const char *const name)
Determine whether a name-value pair should be allowed (not suppressed).
void evel_syslog_proc_set(EVENT_SYSLOG *syslog, const char *const proc)
Set the Process property of the Syslog.
#define EVEL_SYSLOG_MAJOR_VERSION
void evel_json_encode_syslog(EVEL_JSON_BUFFER *jbuf, EVENT_SYSLOG *event)
Encode the Syslog in JSON according to AT&T's schema for the event type.
EVEL_OPTION_STRING event_source_host
EVEL_SOURCE_TYPES event_source_type