From a78d04984240a3d04045402c964d9d8c5be463ef Mon Sep 17 00:00:00 2001 From: Dmitri Pal Date: Sun, 27 Sep 2009 22:16:17 -0400 Subject: ELAPI Resolving message attribute This patch continues work started with the previous patch. It resolves message attribute. Message attribute is a special attribute in the event that may contain references to other attributes in the event. When message is resolved the references are replaced with actual values of the referenced attributes. --- common/elapi/elapi_priv.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'common/elapi/elapi_priv.h') diff --git a/common/elapi/elapi_priv.h b/common/elapi/elapi_priv.h index 27b0079ff..e7480f90b 100644 --- a/common/elapi/elapi_priv.h +++ b/common/elapi/elapi_priv.h @@ -24,6 +24,7 @@ #include #include "collection.h" +#include "elapi_basic.h" #include "elapi_async.h" #include "elapi_sink.h" @@ -178,8 +179,8 @@ struct elapi_sink_ctx { * needed to resolve the event. */ struct elapi_resolve_data { - /* Reference to the event */ - struct collection_item *event; + /* Reference to the message item inside event */ + struct collection_item *message; /* Reference back to dispatcher */ struct elapi_dispatcher *handle; /* Time related data */ @@ -321,6 +322,12 @@ int elapi_resolve_event(struct collection_item **final_event, struct collection_item *event, struct elapi_dispatcher *handle); +/* Function to place the event items into a formatted string */ +int elapi_sprintf(struct elapi_data_out *out_data, + const char *format_str, + struct collection_item *event); + + /* Send ELAPI config errors into a file */ void elapi_dump_ini_err(struct collection_item *error_list); -- cgit