X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Floglevel.hpp;fp=src%2Fbin%2Flttng%2Floglevel.hpp;h=f2cc9139b3914bc10e9ff3d77c1bc78e5e685d2e;hp=0000000000000000000000000000000000000000;hb=c9e313bc594f40a86eed237dce222c0fc99c957f;hpb=4878de5c7deb512bbdac4fdfc498907efa06fb7c diff --git a/src/bin/lttng/loglevel.hpp b/src/bin/lttng/loglevel.hpp new file mode 100644 index 000000000..f2cc9139b --- /dev/null +++ b/src/bin/lttng/loglevel.hpp @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2021 Jérémie Galarneau + * + * SPDX-License-Identifier: GPL-2.0-only + * + */ + +#ifndef _LTTNG_LOGLEVEL_UTILS_H +#define _LTTNG_LOGLEVEL_UTILS_H + +#include +#include + +int loglevel_name_to_value(const char *name, enum lttng_loglevel *loglevel); + +bool loglevel_parse_range_string(const char *str, + enum lttng_loglevel *min, + enum lttng_loglevel *max); + +int loglevel_log4j_name_to_value( + const char *name, enum lttng_loglevel_log4j *loglevel); + +bool loglevel_log4j_parse_range_string(const char *str, + enum lttng_loglevel_log4j *min, + enum lttng_loglevel_log4j *max); + +int loglevel_jul_name_to_value( + const char *name, enum lttng_loglevel_jul *loglevel); + +bool loglevel_jul_parse_range_string(const char *str, + enum lttng_loglevel_jul *min, + enum lttng_loglevel_jul *max); + +int loglevel_python_name_to_value( + const char *name, enum lttng_loglevel_python *loglevel); + +bool loglevel_python_parse_range_string(const char *str, + enum lttng_loglevel_python *min, + enum lttng_loglevel_python *max); + +const char *loglevel_value_to_name(int loglevel); + +const char *loglevel_log4j_value_to_name(int loglevel); + +const char *loglevel_jul_value_to_name(int loglevel); + +const char *loglevel_python_value_to_name(int loglevel); + +#endif /* _LTTNG_LOGLEVEL_UTILS_H */