client-c
0.8.1
|
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.
Classes | |
struct | kaa_log_record_info_t |
Log record info. More... | |
struct | kaa_log_bucket_constraints_t |
Macros | |
#define | KAA_LOG_COLLECTOR_T |
Typedefs | |
typedef struct kaa_log_collector | 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.
Copyright 2014-2016 CyberVision, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Supplies API for Kaa data collection / logging subsystem.
Definition in file kaa_logging.h.
#define KAA_LOG_COLLECTOR_T |
Definition at line 39 of file kaa_logging.h.
typedef struct kaa_log_collector kaa_log_collector_t |
Private log collector structure.
Definition at line 43 of file kaa_logging.h.
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] | bucket | Pointer to log bucket 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_storage_context | Log storage context. |