client-c  0.6.3
kaa_logging.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
24 # ifndef KAA_LOGGING_H_
25 # define KAA_LOGGING_H_
26 
27 # ifndef KAA_DISABLE_FEATURE_LOGGING
28 
29 # include "gen/kaa_logging_gen.h"
32 
33 # ifdef __cplusplus
34 extern "C" {
35 # endif
36 
40 typedef kaa_test_log_record_t kaa_user_log_record_t;
41 
42 
43 
48 #ifndef KAA_LOG_COLLECTOR_T
49 # define KAA_LOG_COLLECTOR_T
50  typedef struct kaa_log_collector kaa_log_collector_t;
51 #endif
52 
53 
63 kaa_error_t kaa_logging_init(kaa_log_collector_t *self, void *log_storage_context, void *log_upload_strategy_context);
64 
65 
66 
76 kaa_error_t kaa_logging_add_record(kaa_log_collector_t *self, kaa_user_log_record_t *entry);
77 
78 # ifdef __cplusplus
79 } /* extern "C" */
80 # endif
81 
82 # endif /* KAA_DISABLE_FEATURE_LOGGING */
83 
84 # endif /* KAA_LOGGING_H_ */
External log upload strategy interface used by Kaa data collection subsystem to decide when to upload...
kaa_error_t
Definition: kaa_error.h:31
kaa_error_t kaa_logging_init(kaa_log_collector_t *self, void *log_storage_context, void *log_upload_strategy_context)
Initializes data collection module with the storage interface, upload strategy, and other settings...
kaa_test_log_record_t kaa_user_log_record_t
Definition: kaa_logging.h:40
kaa_error_t kaa_logging_add_record(kaa_log_collector_t *self, kaa_user_log_record_t *entry)
Serializes and adds a log record to the log storage.
External log storage interface used by Kaa data collection subsystem to temporarily store the logs be...
struct kaa_log_collector kaa_log_collector_t
Definition: kaa_context.h:77