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
/* MIT License
2
*
3
* Copyright (c) 2012-2020 Samsung Electronics Co., Ltd.
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining a copy
6
* of this software and associated documentation files (the "Software"), to deal
7
* in the Software without restriction, including without limitation the rights
8
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
* copies of the Software, and to permit persons to whom the Software is furnished
10
* to do so, subject to the following conditions:
11
*
12
* The above copyright notice and this permission notice shall be included in all
13
* copies or substantial portions of the Software.
14
*
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
* THE SOFTWARE. */
22
23
#ifndef __TIZEN_SYSTEM_DLOGUTIL_H__
24
#define __TIZEN_SYSTEM_DLOGUTIL_H__
25
26
#include <time.h>
27
#include <tizen_type.h>
28
#include <
dlog.h
>
29
#include <limits.h>
30
31
#ifdef __cplusplus
32
extern
"C"
{
33
#endif
34
45
typedef
enum
{
46
DLOGUTIL_SORT_SENT_MONO
= 0,
47
DLOGUTIL_SORT_SENT_REAL
,
48
DLOGUTIL_SORT_RECV_MONO
,
49
DLOGUTIL_SORT_RECV_REAL
,
50
DLOGUTIL_SORT_DEFAULT
,
52
}
dlogutil_sorting_order_e
;
53
58
typedef
struct
dlogutil_entry
dlogutil_entry_s
;
59
72
int
dlogutil_entry_get_tid
(
const
dlogutil_entry_s
*entry, pid_t *tid);
73
86
int
dlogutil_entry_get_pid
(
const
dlogutil_entry_s
*entry, pid_t *pid);
87
101
int
dlogutil_entry_get_tag
(
const
dlogutil_entry_s
*entry,
const
char
**tag);
102
116
int
dlogutil_entry_get_message
(
const
dlogutil_entry_s
*entry,
const
char
**msg);
117
133
int
dlogutil_entry_get_timestamp
(
const
dlogutil_entry_s
*entry,
dlogutil_sorting_order_e
order,
struct
timespec *ts);
134
145
int
dlogutil_entry_get_priority
(
const
dlogutil_entry_s
*entry,
log_priority
*prio);
146
151
typedef
struct
dlogutil_config
dlogutil_config_s
;
152
160
dlogutil_config_s
*
dlogutil_config_create
(
void
);
161
168
void
dlogutil_config_destroy
(
dlogutil_config_s
*config);
169
180
int
dlogutil_config_filter_tid
(
dlogutil_config_s
*config, pid_t tid);
181
192
int
dlogutil_config_filter_pid
(
dlogutil_config_s
*config, pid_t pid);
193
205
int
dlogutil_config_filter_filterspec
(
dlogutil_config_s
*config,
const
char
*query);
206
217
int
dlogutil_config_sorting_disable
(
dlogutil_config_s
*config);
218
230
int
dlogutil_config_sorting_enable
(
dlogutil_config_s
*config);
231
247
int
dlogutil_config_sorting_enable_with_size
(
dlogutil_config_s
*config,
unsigned
int
entry_count);
248
263
int
dlogutil_config_order_set
(
dlogutil_config_s
*config,
dlogutil_sorting_order_e
sort_by);
264
275
int
dlogutil_config_buffer_add
(
dlogutil_config_s
*config, log_id_t buf);
276
282
#define DLOGUTIL_MAX_DUMP_SIZE UINT_MAX
283
288
typedef
struct
dlogutil_state
dlogutil_state_s
;
289
296
void
dlogutil_state_destroy
(
dlogutil_state_s
*state);
297
309
int
dlogutil_config_mode_set_continuous
(
dlogutil_config_s
*config);
310
322
int
dlogutil_config_mode_set_monitor
(
dlogutil_config_s
*config);
323
338
int
dlogutil_config_mode_set_dump
(
dlogutil_config_s
*config,
unsigned
int
entry_count);
339
340
357
int
dlogutil_config_connect
(
dlogutil_config_s
*config,
dlogutil_state_s
**state_out);
358
379
int
dlogutil_get_log
(
dlogutil_state_s
*state,
int
timeout,
dlogutil_entry_s
**entry_out);
380
396
int
dlogutil_buffer_clear
(
dlogutil_state_s
*state, log_id_t buffer);
397
409
int
dlogutil_buffer_get_name
(log_id_t buffer,
const
char
**name);
410
432
int
dlogutil_buffer_get_capacity
(
dlogutil_state_s
*state, log_id_t buffer,
unsigned
int
*capacity);
433
455
int
dlogutil_buffer_get_usage
(
dlogutil_state_s
*state, log_id_t buffer,
unsigned
int
*usage);
456
476
int
dlogutil_buffer_get_default_ts_type
(log_id_t buffer,
dlogutil_sorting_order_e
*type);
477
498
int
dlogutil_buffer_check_ts_type_available
(log_id_t buffer,
dlogutil_sorting_order_e
type,
bool
*available);
499
519
int
dlogutil_buffer_get_alias
(
dlogutil_state_s
*state, log_id_t buffer, log_id_t *real_buffer);
520
525
#ifdef __cplusplus
526
}
527
#endif
528
529
#endif
/* __TIZEN_SYSTEM_DLOGUTIL_H__ */
Generated by
1.8.2