Commit | Line | Data |
---|---|---|
7e8f2e9c JG |
1 | /* |
2 | * Copyright (C) 2021 Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
3 | * | |
4 | * SPDX-License-Identifier: GPL-2.0-only | |
5 | * | |
6 | */ | |
7 | ||
8 | #ifndef _LTTNG_LOGLEVEL_UTILS_H | |
9 | #define _LTTNG_LOGLEVEL_UTILS_H | |
10 | ||
11 | #include <lttng/lttng.h> | |
12 | #include <common/macros.h> | |
13 | ||
14 | LTTNG_HIDDEN | |
15 | int loglevel_name_to_value(const char *name, enum lttng_loglevel *loglevel); | |
16 | ||
949f049b SM |
17 | LTTNG_HIDDEN |
18 | bool loglevel_parse_range_string(const char *str, | |
19 | enum lttng_loglevel *min, | |
20 | enum lttng_loglevel *max); | |
21 | ||
7e8f2e9c JG |
22 | LTTNG_HIDDEN |
23 | int loglevel_log4j_name_to_value( | |
24 | const char *name, enum lttng_loglevel_log4j *loglevel); | |
25 | ||
949f049b SM |
26 | LTTNG_HIDDEN |
27 | bool loglevel_log4j_parse_range_string(const char *str, | |
28 | enum lttng_loglevel_log4j *min, | |
29 | enum lttng_loglevel_log4j *max); | |
30 | ||
7e8f2e9c JG |
31 | LTTNG_HIDDEN |
32 | int loglevel_jul_name_to_value( | |
33 | const char *name, enum lttng_loglevel_jul *loglevel); | |
34 | ||
949f049b SM |
35 | LTTNG_HIDDEN |
36 | bool loglevel_jul_parse_range_string(const char *str, | |
37 | enum lttng_loglevel_jul *min, | |
38 | enum lttng_loglevel_jul *max); | |
39 | ||
7e8f2e9c JG |
40 | LTTNG_HIDDEN |
41 | int loglevel_python_name_to_value( | |
42 | const char *name, enum lttng_loglevel_python *loglevel); | |
43 | ||
949f049b SM |
44 | LTTNG_HIDDEN |
45 | bool loglevel_python_parse_range_string(const char *str, | |
46 | enum lttng_loglevel_python *min, | |
47 | enum lttng_loglevel_python *max); | |
48 | ||
85b05318 JR |
49 | LTTNG_HIDDEN |
50 | const char *loglevel_value_to_name(int loglevel); | |
51 | ||
52 | LTTNG_HIDDEN | |
53 | const char *loglevel_log4j_value_to_name(int loglevel); | |
54 | ||
55 | LTTNG_HIDDEN | |
56 | const char *loglevel_jul_value_to_name(int loglevel); | |
57 | ||
58 | LTTNG_HIDDEN | |
59 | const char *loglevel_python_value_to_name(int loglevel); | |
60 | ||
7e8f2e9c | 61 | #endif /* _LTTNG_LOGLEVEL_UTILS_H */ |