client-c  0.8.1
kaa_logging.h File Reference

Kaa data logging subsystem API. More...

+ Include dependency graph for kaa_logging.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...
 

Detailed Description

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.

Macro Definition Documentation

#define KAA_LOG_COLLECTOR_T

Definition at line 39 of file kaa_logging.h.

Typedef Documentation

typedef struct kaa_log_collector kaa_log_collector_t

Private log collector structure.

Definition at line 43 of file kaa_logging.h.

Function Documentation

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.

Parameters
[in]selfPointer to a kaa_log_collector_t instance.
[in]entryPointer to log entry to be added to the storage.
[out]bucketPointer to log bucket info. May be NULL.
Returns
Error code.
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.

Parameters
[in]selfPointer to a kaa_log_collector_t instance.
[in]log_storage_contextLog storage context.
[in]log_upload_strategy_contextLog upload strategy context.
[in]bucket_sizesBucket size constraints.
Returns
Error code.
kaa_error_t kaa_logging_set_listeners ( kaa_log_collector_t self,
const kaa_log_delivery_listener_t listeners 
)

Sets listeners of log events.

Parameters
[in]selfPointer to a kaa_log_collector_t instance.
[in]listenersPointer to listeners that will be used to handle various log delivery events.
See also
KAA_LOG_EMPTY_LISTENERS can be used to unsubscribe from log events.
Returns
Error code.
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.

Parameters
[in]selfPointer to a kaa_log_collector_t instance.
[in]log_storage_contextLog storage context.
Returns
Error code.
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.

Parameters
[in]selfPointer to a kaa_log_collector_t instance.
[in]log_storage_contextLog storage context.
Returns
Error code.