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
56
typedef
enum
{
57
DLOGUTIL_BUF_MAIN
= 1 << LOG_ID_MAIN,
58
DLOGUTIL_BUF_RADIO
= 1 << LOG_ID_RADIO,
59
DLOGUTIL_BUF_SYSTEM
= 1 << LOG_ID_SYSTEM,
60
DLOGUTIL_BUF_APPS
= 1 << LOG_ID_APPS,
61
DLOGUTIL_BUF_KMSG
= 1 << LOG_ID_KMSG,
62
DLOGUTIL_BUF_SYSLOG
= 1 << LOG_ID_SYSLOG,
63
}
dlogutil_buffer_e
;
64
69
typedef
struct
dlogutil_entry
dlogutil_entry_s
;
70
83
int
dlogutil_entry_get_tid
(
const
dlogutil_entry_s
*entry, pid_t *tid);
84
97
int
dlogutil_entry_get_pid
(
const
dlogutil_entry_s
*entry, pid_t *pid);
98
112
int
dlogutil_entry_get_tag
(
const
dlogutil_entry_s
*entry,
const
char
**tag);
113
127
int
dlogutil_entry_get_message
(
const
dlogutil_entry_s
*entry,
const
char
**msg);
128
144
int
dlogutil_entry_get_timestamp
(
const
dlogutil_entry_s
*entry,
dlogutil_sorting_order_e
order,
struct
timespec *ts);
145
156
int
dlogutil_entry_get_priority
(
const
dlogutil_entry_s
*entry,
log_priority
*prio);
157
162
typedef
struct
dlogutil_filter_options
dlogutil_filter_options_s
;
163
171
dlogutil_filter_options_s
*
dlogutil_filter_options_create
(
void
);
172
179
void
dlogutil_filter_options_destroy
(
dlogutil_filter_options_s
*filter);
180
191
int
dlogutil_filter_options_set_tid
(
dlogutil_filter_options_s
*filter, pid_t tid);
192
203
int
dlogutil_filter_options_set_pid
(
dlogutil_filter_options_s
*filter, pid_t pid);
204
216
int
dlogutil_filter_options_set_filterspec
(
dlogutil_filter_options_s
*filter,
const
char
*query);
217
222
typedef
struct
dlogutil_sorting_options
dlogutil_sorting_options_s
;
223
231
dlogutil_sorting_options_s
*
dlogutil_sorting_options_create
(
void
);
232
239
void
dlogutil_sorting_options_destroy
(
dlogutil_sorting_options_s
*sorting);
240
251
int
dlogutil_sorting_options_disable_sorting
(
dlogutil_sorting_options_s
*sorting);
252
264
int
dlogutil_sorting_options_enable_sorting
(
dlogutil_sorting_options_s
*sorting);
265
281
int
dlogutil_sorting_options_enable_sorting_with_size
(
dlogutil_sorting_options_s
*sorting,
unsigned
int
entry_count);
282
297
int
dlogutil_sorting_options_set_sort_by
(
dlogutil_sorting_options_s
*sorting,
dlogutil_sorting_order_e
sort_by);
298
310
typedef
int
dlogutil_entry_cb
(
const
dlogutil_entry_s
*entry,
void
*data);
311
317
#define DLOGUTIL_MAX_DUMP_SIZE UINT_MAX
318
378
int
dlogutil_get_logs_continuous
(
int
buffers,
dlogutil_entry_cb
callback,
void
*data,
dlogutil_sorting_options_s
*sorting,
dlogutil_filter_options_s
*filter);
379
439
int
dlogutil_get_logs_monitor
(
int
buffers,
dlogutil_entry_cb
callback,
void
*data,
dlogutil_sorting_options_s
*sorting,
dlogutil_filter_options_s
*filter);
440
504
int
dlogutil_get_logs_dump
(
int
buffers,
unsigned
int
entry_count,
dlogutil_entry_cb
callback,
void
*data,
dlogutil_sorting_options_s
*sorting,
dlogutil_filter_options_s
*filter);
505
517
int
dlogutil_buffer_clear
(
dlogutil_buffer_e
buffer);
518
533
int
dlogutil_buffer_get_name
(
dlogutil_buffer_e
buffer,
const
char
**name);
534
552
int
dlogutil_buffer_get_size
(
dlogutil_buffer_e
buffer,
unsigned
int
*size);
553
574
int
dlogutil_buffer_get_default_ts_type
(
dlogutil_buffer_e
buffer,
dlogutil_sorting_order_e
*type);
575
596
int
dlogutil_buffer_check_ts_type_available
(
dlogutil_buffer_e
buffer,
dlogutil_sorting_order_e
type,
bool
*available);
597
602
#ifdef __cplusplus
603
}
604
#endif
605
606
#endif
/* __TIZEN_SYSTEM_DLOGUTIL_H__ */
Generated by
1.8.2