dlog
Logging framework
 All Files Functions Typedefs Enumerations Enumerator Groups Pages
dlogutil.h
Go to the documentation of this file.
1 /*
2  * DLOG
3  * Copyright (c) 2005-2008, The Android Open Source Project
4  * Copyright (c) 2012-2020 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the License);
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef __TIZEN_SYSTEM_DLOGUTIL_H__
20 #define __TIZEN_SYSTEM_DLOGUTIL_H__
21 
22 #include <time.h>
23 #include <tizen_type.h>
24 #include <dlog.h>
25 #include <limits.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
41 typedef enum {
49 
54 typedef struct dlogutil_entry dlogutil_entry_s;
55 
68 int dlogutil_entry_get_tid(const dlogutil_entry_s *entry, pid_t *tid);
69 
82 int dlogutil_entry_get_pid(const dlogutil_entry_s *entry, pid_t *pid);
83 
97 int dlogutil_entry_get_tag(const dlogutil_entry_s *entry, const char **tag);
98 
112 int dlogutil_entry_get_message(const dlogutil_entry_s *entry, const char **msg);
113 
129 int dlogutil_entry_get_timestamp(const dlogutil_entry_s *entry, dlogutil_sorting_order_e order, struct timespec *ts);
130 
142 
147 typedef struct dlogutil_config dlogutil_config_s;
148 
157 
165 
176 int dlogutil_config_filter_tid(dlogutil_config_s *config, pid_t tid);
177 
188 int dlogutil_config_filter_pid(dlogutil_config_s *config, pid_t pid);
189 
201 int dlogutil_config_filter_filterspec(dlogutil_config_s *config, const char *query);
202 
214 
227 
243 int dlogutil_config_sorting_enable_with_size(dlogutil_config_s *config, unsigned int entry_count);
244 
260 
271 int dlogutil_config_buffer_add(dlogutil_config_s *config, log_id_t buf);
272 
278 #define DLOGUTIL_MAX_DUMP_SIZE UINT_MAX
279 
284 typedef struct dlogutil_state dlogutil_state_s;
285 
293 
306 
319 
334 int dlogutil_config_mode_set_dump(dlogutil_config_s *config, unsigned int entry_count);
335 
336 
352 
373 int dlogutil_get_log(dlogutil_state_s *state, int timeout, dlogutil_entry_s **entry_out);
374 
393 int dlogutil_buffer_clear(dlogutil_state_s *state, log_id_t buffer);
394 
406 int dlogutil_buffer_get_name(log_id_t buffer, const char **name);
407 
427 int dlogutil_buffer_get_capacity(dlogutil_state_s *state, log_id_t buffer, unsigned int *capacity);
428 
448 int dlogutil_buffer_get_usage(dlogutil_state_s *state, log_id_t buffer, unsigned int *usage);
449 
470 
491 int dlogutil_buffer_check_ts_type_available(log_id_t buffer, dlogutil_sorting_order_e type, bool *available);
492 
512 int dlogutil_buffer_get_alias(dlogutil_state_s *state, log_id_t buffer, log_id_t *real_buffer);
513 
518 #ifdef __cplusplus
519 }
520 #endif
521 
522 #endif /* __TIZEN_SYSTEM_DLOGUTIL_H__ */