dlog
Logging framework
Main Page
Related Pages
Modules
Files
File List
Globals
All
Files
Functions
Typedefs
Enumerations
Enumerator
Groups
Pages
include
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
{
42
DLOGUTIL_SORT_SENT_MONO
= 0,
43
DLOGUTIL_SORT_SENT_REAL
,
44
DLOGUTIL_SORT_RECV_MONO
,
45
DLOGUTIL_SORT_RECV_REAL
,
46
DLOGUTIL_SORT_DEFAULT
,
48
}
dlogutil_sorting_order_e
;
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
141
int
dlogutil_entry_get_priority
(
const
dlogutil_entry_s
*entry,
log_priority
*prio);
142
147
typedef
struct
dlogutil_config
dlogutil_config_s
;
148
156
dlogutil_config_s
*
dlogutil_config_create
(
void
);
157
164
void
dlogutil_config_destroy
(
dlogutil_config_s
*config);
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
213
int
dlogutil_config_sorting_disable
(
dlogutil_config_s
*config);
214
226
int
dlogutil_config_sorting_enable
(
dlogutil_config_s
*config);
227
243
int
dlogutil_config_sorting_enable_with_size
(
dlogutil_config_s
*config,
unsigned
int
entry_count);
244
259
int
dlogutil_config_order_set
(
dlogutil_config_s
*config,
dlogutil_sorting_order_e
sort_by);
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
292
void
dlogutil_state_destroy
(
dlogutil_state_s
*state);
293
305
int
dlogutil_config_mode_set_continuous
(
dlogutil_config_s
*config);
306
318
int
dlogutil_config_mode_set_monitor
(
dlogutil_config_s
*config);
319
334
int
dlogutil_config_mode_set_dump
(
dlogutil_config_s
*config,
unsigned
int
entry_count);
335
336
351
int
dlogutil_config_connect
(
dlogutil_config_s
*config,
dlogutil_state_s
**state_out);
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
469
int
dlogutil_buffer_get_default_ts_type
(log_id_t buffer,
dlogutil_sorting_order_e
*type);
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__ */
Generated by
1.8.2