Babeltrace 2 C API  2.1.1
Open-source trace manipulation framework
logging.h
1 /*
2  * SPDX-License-Identifier: MIT
3  *
4  * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5  */
6 
7 #ifndef BABELTRACE2_LOGGING_H
8 #define BABELTRACE2_LOGGING_H
9 
10 /* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
11 
12 #ifndef __BT_IN_BABELTRACE_H
13 # error "Please include <babeltrace2/babeltrace.h> instead."
14 #endif
15 
16 #include <babeltrace2/logging-defs.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
97 typedef enum bt_logging_level {
107  BT_LOGGING_LEVEL_TRACE = __BT_LOGGING_LEVEL_TRACE,
108 
119  BT_LOGGING_LEVEL_DEBUG = __BT_LOGGING_LEVEL_DEBUG,
120 
131  BT_LOGGING_LEVEL_INFO = __BT_LOGGING_LEVEL_INFO,
132 
143  BT_LOGGING_LEVEL_WARNING = __BT_LOGGING_LEVEL_WARNING,
144 
158  BT_LOGGING_LEVEL_ERROR = __BT_LOGGING_LEVEL_ERROR,
159 
169  BT_LOGGING_LEVEL_FATAL = __BT_LOGGING_LEVEL_FATAL,
170 
175  BT_LOGGING_LEVEL_NONE = __BT_LOGGING_LEVEL_NONE,
177 
193 extern void bt_logging_set_global_level(bt_logging_level logging_level)
194  __BT_NOEXCEPT;
195 
206 extern bt_logging_level bt_logging_get_global_level(void) __BT_NOEXCEPT;
207 
225 extern bt_logging_level bt_logging_get_minimal_level(void) __BT_NOEXCEPT;
226 
229 #ifdef __cplusplus
230 }
231 #endif
232 
233 #endif /* BABELTRACE2_LOGGING_H */
DEBUG level.
Definition: logging.h:119
bt_logging_level bt_logging_get_minimal_level(void)
Returns the minimal (build-time) logging level of the library.
FATAL level.
Definition: logging.h:169
Logging is disabled.
Definition: logging.h:175
INFO level.
Definition: logging.h:131
void bt_logging_set_global_level(bt_logging_level logging_level)
Sets the logging level of all the libbabeltrace2 modules to logging_level.
ERROR level.
Definition: logging.h:158
bt_logging_level
Logging level enumerators.
Definition: logging.h:97
bt_logging_level bt_logging_get_global_level(void)
Returns the current logging level of all the libbabeltrace2 modules.
TRACE level.
Definition: logging.h:107
WARNING level.
Definition: logging.h:143