Kaa client C SDK
|
Kaa data logging subsystem API. More...
#include "gen/kaa_logging_definitions.h"
#include "platform/ext_log_storage.h"
#include "platform/ext_log_upload_strategy.h"
#include "platform/ext_log_delivery_listener.h"
Go to the source code of this file.
Data Structures | |
struct | kaa_log_record_info_t |
Log record info. More... | |
struct | kaa_log_bucket_constraints_t |
Constraints applied to log buckets. More... | |
Typedefs | |
typedef struct kaa_log_collector_t | kaa_log_collector_t |
Functions | |
kaa_error_t | kaa_logging_init (kaa_log_collector_t *self, void *log_storage_context, void *log_upload_strategy_context, const kaa_log_bucket_constraints_t *bucket_sizes) |
Initializes data collection module with the storage interface, upload strategy, and other settings. More... | |
kaa_error_t | kaa_logging_set_strategy (kaa_log_collector_t *self, void *log_upload_strategy_context) |
Sets custom strategy for given collector. More... | |
kaa_error_t | kaa_logging_set_storage (kaa_log_collector_t *self, void *log_storage_context) |
Sets custom storage for given collector. More... | |
kaa_error_t | kaa_logging_add_record (kaa_log_collector_t *self, kaa_user_log_record_t *entry, kaa_log_record_info_t *log_info) |
Serializes and adds a log record to the log storage. More... | |
kaa_error_t | kaa_logging_set_listeners (kaa_log_collector_t *self, const kaa_log_delivery_listener_t *listeners) |
Sets listeners of log events. More... | |
Kaa data logging subsystem API.
Supplies API for Kaa data collection / logging subsystem.
typedef struct kaa_log_collector_t kaa_log_collector_t |
kaa_error_t kaa_logging_add_record | ( | kaa_log_collector_t * | self, |
kaa_user_log_record_t * | entry, | ||
kaa_log_record_info_t * | log_info | ||
) |
Serializes and adds a log record to the log storage.
[in] | self | Pointer to a kaa_log_collector_t instance. |
[in] | entry | Pointer to log entry to be added to the storage. |
[out] | log_info | Pointer to log info. May be NULL . |
kaa_error_t kaa_logging_init | ( | kaa_log_collector_t * | self, |
void * | log_storage_context, | ||
void * | log_upload_strategy_context, | ||
const kaa_log_bucket_constraints_t * | bucket_sizes | ||
) |
Initializes data collection module with the storage interface, upload strategy, and other settings.
[in] | self | Pointer to a kaa_log_collector_t instance. |
[in] | log_storage_context | Log storage context. |
[in] | log_upload_strategy_context | Log upload strategy context. |
[in] | bucket_sizes | Bucket size constraints. |
kaa_error_t kaa_logging_set_listeners | ( | kaa_log_collector_t * | self, |
const kaa_log_delivery_listener_t * | listeners | ||
) |
Sets listeners of log events.
[in] | self | Pointer to a kaa_log_collector_t instance. |
[in] | listeners | Pointer to listeners that will be used to handle various log delivery events. |
kaa_error_t kaa_logging_set_storage | ( | kaa_log_collector_t * | self, |
void * | log_storage_context | ||
) |
Sets custom storage for given collector.
If a storage has been assigned to collector previously then it will be destroyed and new storage will be assigned. Be aware that all items from previous storage will be deleted.
[in] | self | Pointer to a kaa_log_collector_t instance. |
[in] | log_storage_context | Log storage context. |
kaa_error_t kaa_logging_set_strategy | ( | kaa_log_collector_t * | self, |
void * | log_upload_strategy_context | ||
) |
Sets custom strategy for given collector.
If a strategy has been assigned to collector previously then it will be destroyed and new strategy will be assigned.
[in] | self | Pointer to a kaa_log_collector_t instance. |
[in] | log_upload_strategy_context | Log storage context. |