2 * Copyright (C) 2021 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
8 #ifndef _LTTNG_LOGLEVEL_UTILS_H
9 #define _LTTNG_LOGLEVEL_UTILS_H
11 #include <common/macros.hpp>
13 #include <lttng/lttng.h>
15 int loglevel_name_to_value(const char *name, enum lttng_loglevel *loglevel);
17 bool loglevel_parse_range_string(const char *str,
18 enum lttng_loglevel *min,
19 enum lttng_loglevel *max);
21 int loglevel_log4j_name_to_value(const char *name, enum lttng_loglevel_log4j *loglevel);
23 bool loglevel_log4j_parse_range_string(const char *str,
24 enum lttng_loglevel_log4j *min,
25 enum lttng_loglevel_log4j *max);
27 int loglevel_jul_name_to_value(const char *name, enum lttng_loglevel_jul *loglevel);
29 bool loglevel_jul_parse_range_string(const char *str,
30 enum lttng_loglevel_jul *min,
31 enum lttng_loglevel_jul *max);
33 int loglevel_python_name_to_value(const char *name, enum lttng_loglevel_python *loglevel);
35 bool loglevel_python_parse_range_string(const char *str,
36 enum lttng_loglevel_python *min,
37 enum lttng_loglevel_python *max);
39 const char *loglevel_value_to_name(int loglevel);
41 const char *loglevel_log4j_value_to_name(int loglevel);
43 const char *loglevel_jul_value_to_name(int loglevel);
45 const char *loglevel_python_value_to_name(int loglevel);
47 #endif /* _LTTNG_LOGLEVEL_UTILS_H */