From: Philippe Proulx Date: Tue, 9 Jul 2019 19:37:09 +0000 (-0400) Subject: Rename WARN log level to WARNING X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=770538dd64bcd8f258cb059c438f845533900a27 Rename WARN log level to WARNING It's weird that this log level is abbreviated, but not the other ones. Signed-off-by: Philippe Proulx Change-Id: Id14da1ba6cd38f7d824079218280bff9dea1e276 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1663 Tested-by: jenkins --- diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index d9ddf815..066382a4 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -330,10 +330,10 @@ order of severity: |`BT_LOG_INFO` |`BT_LOGGING_LEVEL_INFO` -|_WARN_ +|_WARNING_ |`W` -|`BT_LOG_WARN` -|`BT_LOGGING_LEVEL_WARN` +|`BT_LOG_WARNING` +|`BT_LOGGING_LEVEL_WARNING` |_ERROR_ |`E` @@ -374,13 +374,13 @@ You can set this level at configuration time with the + -- ---- -$ BABELTRACE_MINIMAL_LOG_LEVEL=WARN ./configure +$ BABELTRACE_MINIMAL_LOG_LEVEL=INFO ./configure ---- -- + The default build-time log level is `DEBUG`. For optimal performance, set it to `INFO`, which effectively disables all fast path logging in -all the Babeltrace modules. You can't set it to `WARN`, `ERROR`, +all the Babeltrace modules. You can't set it to `WARNING`, `ERROR`, `FATAL`, or `NONE` because the impact on performance is minuscule starting from the _INFO_ log level anyway and we want any Babeltrace build to always be able to print _INFO_-level logs. @@ -879,7 +879,7 @@ The available definitions for build-time conditions are: * `BT_LOG_ENABLED_TRACE` * `BT_LOG_ENABLED_DEBUG` * `BT_LOG_ENABLED_INFO` -* `BT_LOG_ENABLED_WARN` +* `BT_LOG_ENABLED_WARNING` * `BT_LOG_ENABLED_ERROR` * `BT_LOG_ENABLED_FATAL` @@ -901,7 +901,7 @@ The available definitions for run-time conditions are: * `BT_LOG_ON_TRACE` * `BT_LOG_ON_DEBUG` * `BT_LOG_ON_INFO` -* `BT_LOG_ON_WARN` +* `BT_LOG_ON_WARNING` * `BT_LOG_ON_ERROR` * `BT_LOG_ON_FATAL` @@ -1291,16 +1291,17 @@ least exit cleanly. * Almost any error in terminal elements: CLI and plugins. |Almost none: always enabled. -|_WARN_ +|_WARNING_ | An error which still allows the execution to continue, but you judge that it should be reported to the user. -_WARN_-level logging statements are for any error or weird action that -is directly or indirectly caused by the user, often through some bad -input data. For example, not having enough memory is considered beyond -the user's control, so we always log memory errors with an _ERROR_ level -(not _FATAL_ because we usually don't abort in this condition). +_WARNING_-level logging statements are for any error or weird action +that is directly or indirectly caused by the user, often through some +bad input data. For example, not having enough memory is considered +beyond the user's control, so we always log memory errors with an +_ERROR_ level (not _FATAL_ because we usually don't abort in this +condition). | * Missing data within something that is expected to have it, but there's an alternative. @@ -1364,7 +1365,7 @@ other log levels). More appropriate for tracing in general. [IMPORTANT] -- -Make sure not to use a _WARN_ (or higher) log level when the +Make sure not to use a _WARNING_ (or higher) log level when the condition leading to the logging statement can occur under normal circumstances. @@ -1453,7 +1454,7 @@ name and line number, and the <>. When Babeltrace supports terminal color codes (depends on the `BABELTRACE_TERM_COLOR` environment variable's value and what the standard output and error streams are plugged into), _INFO_-level lines -are blue, _WARN_-level lines are yellow, and _ERROR_-level and +are blue, _WARNING_-level lines are yellow, and _ERROR_-level and _FATAL_-level lines are red. Log line example: diff --git a/include/babeltrace2/logging.h b/include/babeltrace2/logging.h index 5001e139..172f1231 100644 --- a/include/babeltrace2/logging.h +++ b/include/babeltrace2/logging.h @@ -83,7 +83,7 @@ typedef enum bt_logging_level { The library's and object's states remain consistent when a warning is issued. */ - BT_LOGGING_LEVEL_WARN = 4, + BT_LOGGING_LEVEL_WARNING = 4, /** An important error from which the library cannot recover, but diff --git a/src/bindings/python/bt2/bt2/logging.py b/src/bindings/python/bt2/bt2/logging.py index f2a87e86..f07e8ea6 100644 --- a/src/bindings/python/bt2/bt2/logging.py +++ b/src/bindings/python/bt2/bt2/logging.py @@ -28,7 +28,7 @@ class LoggingLevel: TRACE = native_bt.LOGGING_LEVEL_TRACE DEBUG = native_bt.LOGGING_LEVEL_DEBUG INFO = native_bt.LOGGING_LEVEL_INFO - WARN = native_bt.LOGGING_LEVEL_WARN + WARNING = native_bt.LOGGING_LEVEL_WARNING ERROR = native_bt.LOGGING_LEVEL_ERROR FATAL = native_bt.LOGGING_LEVEL_FATAL NONE = native_bt.LOGGING_LEVEL_NONE @@ -47,7 +47,7 @@ def set_global_logging_level(level): LoggingLevel.TRACE, LoggingLevel.DEBUG, LoggingLevel.INFO, - LoggingLevel.WARN, + LoggingLevel.WARNING, LoggingLevel.ERROR, LoggingLevel.FATAL, LoggingLevel.NONE, diff --git a/src/bindings/python/bt2/bt2/native_bt_component_class.i b/src/bindings/python/bt2/bt2/native_bt_component_class.i index caa5bf9a..1ec69f21 100644 --- a/src/bindings/python/bt2/bt2/native_bt_component_class.i +++ b/src/bindings/python/bt2/bt2/native_bt_component_class.i @@ -201,7 +201,7 @@ void loge_exception(void) static inline void logw_exception(void) { - log_exception(BT_LOG_WARN); + log_exception(BT_LOG_WARNING); } static inline diff --git a/src/bindings/python/bt2/bt2/utils.py b/src/bindings/python/bt2/bt2/utils.py index 4c0c2d91..6d80fea2 100644 --- a/src/bindings/python/bt2/bt2/utils.py +++ b/src/bindings/python/bt2/bt2/utils.py @@ -131,7 +131,7 @@ def _check_log_level(log_level): bt2.logging.LoggingLevel.TRACE, bt2.logging.LoggingLevel.DEBUG, bt2.logging.LoggingLevel.INFO, - bt2.logging.LoggingLevel.WARN, + bt2.logging.LoggingLevel.WARNING, bt2.logging.LoggingLevel.ERROR, bt2.logging.LoggingLevel.FATAL, bt2.logging.LoggingLevel.NONE, diff --git a/src/cli/babeltrace2-cfg-cli-args.c b/src/cli/babeltrace2-cfg-cli-args.c index 8da792e1..4036413b 100644 --- a/src/cli/babeltrace2-cfg-cli-args.c +++ b/src/cli/babeltrace2-cfg-cli-args.c @@ -59,7 +59,7 @@ } while (0) static bool is_first_error = true; -static const int cli_default_log_level = BT_LOG_WARN; +static const int cli_default_log_level = BT_LOG_WARNING; /* INI-style parsing FSM states */ enum ini_parsing_fsm_state { diff --git a/src/cli/babeltrace2.c b/src/cli/babeltrace2.c index fd8a89cd..cbbc9bd2 100644 --- a/src/cli/babeltrace2.c +++ b/src/cli/babeltrace2.c @@ -2637,7 +2637,7 @@ void warn_command_name_and_directory_clash(struct bt_config *cfg) if (g_file_test(cfg->command_name, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) { _bt_log_write_d(_BT_LOG_SRCLOC_FUNCTION, __FILE__, __LINE__, - BT_LOG_WARN, BT_LOG_TAG, + BT_LOG_WARNING, BT_LOG_TAG, "The `%s` command was executed. " "If you meant to convert a trace located in " "the local `%s` directory, please use:\n\n" diff --git a/src/cli/logging.h b/src/cli/logging.h index 09707421..581f12fb 100644 --- a/src/cli/logging.h +++ b/src/cli/logging.h @@ -38,6 +38,6 @@ BT_LOG_LEVEL_EXTERN_SYMBOL(bt_cli_log_level); #define BT_CLI_LOGE_APPEND_CAUSE(_fmt, ...) \ BT_CLI_LOG_AND_APPEND(BT_LOG_ERROR, _fmt, ##__VA_ARGS__) #define BT_CLI_LOGW_APPEND_CAUSE(_fmt, ...) \ - BT_CLI_LOG_AND_APPEND(BT_LOG_WARN, _fmt, ##__VA_ARGS__) + BT_CLI_LOG_AND_APPEND(BT_LOG_WARNING, _fmt, ##__VA_ARGS__) #endif /* CLI_LOGGING_H */ diff --git a/src/common/common.h b/src/common/common.h index 1b952913..ca1b1399 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -584,8 +584,8 @@ const char *bt_common_logging_level_string( return "BT_LOGGING_LEVEL_DEBUG"; case BT_LOGGING_LEVEL_INFO: return "BT_LOGGING_LEVEL_INFO"; - case BT_LOGGING_LEVEL_WARN: - return "BT_LOGGING_LEVEL_WARN"; + case BT_LOGGING_LEVEL_WARNING: + return "BT_LOGGING_LEVEL_WARNING"; case BT_LOGGING_LEVEL_ERROR: return "BT_LOGGING_LEVEL_ERROR"; case BT_LOGGING_LEVEL_FATAL: diff --git a/src/lib/logging.h b/src/lib/logging.h index 08c3ffb9..2598b473 100644 --- a/src/lib/logging.h +++ b/src/lib/logging.h @@ -49,7 +49,7 @@ int bt_lib_log_level; /* See `CONTRIBUTING.adoc` for usage */ #define BT_LIB_LOGF(_fmt, ...) BT_LIB_LOG(BT_LOG_FATAL, _fmt, ##__VA_ARGS__) #define BT_LIB_LOGE(_fmt, ...) BT_LIB_LOG(BT_LOG_ERROR, _fmt, ##__VA_ARGS__) -#define BT_LIB_LOGW(_fmt, ...) BT_LIB_LOG(BT_LOG_WARN, _fmt, ##__VA_ARGS__) +#define BT_LIB_LOGW(_fmt, ...) BT_LIB_LOG(BT_LOG_WARNING, _fmt, ##__VA_ARGS__) #define BT_LIB_LOGI(_fmt, ...) BT_LIB_LOG(BT_LOG_INFO, _fmt, ##__VA_ARGS__) #define BT_LIB_LOGD(_fmt, ...) BT_LIB_LOG(BT_LOG_DEBUG, _fmt, ##__VA_ARGS__) #define BT_LIB_LOGT(_fmt, ...) BT_LIB_LOG(BT_LOG_TRACE, _fmt, ##__VA_ARGS__) @@ -78,7 +78,7 @@ void bt_lib_log(const char *func, const char *file, unsigned line, #define BT_LIB_LOGE_APPEND_CAUSE(_fmt, ...) \ BT_LIB_LOG_AND_APPEND(BT_LOG_ERROR, _fmt, ##__VA_ARGS__) #define BT_LIB_LOGW_APPEND_CAUSE(_fmt, ...) \ - BT_LIB_LOG_AND_APPEND(BT_LOG_WARN, _fmt, ##__VA_ARGS__) + BT_LIB_LOG_AND_APPEND(BT_LOG_WARNING, _fmt, ##__VA_ARGS__) /* * Like bt_lib_log(), but also appends a cause to the current thread's diff --git a/src/logging/log.c b/src/logging/log.c index 7f0569ef..093930d2 100644 --- a/src/logging/log.c +++ b/src/logging/log.c @@ -108,7 +108,7 @@ extern unsigned long pthread_getsequence_np(pthread_t *); * level variable. In that case it must be defined elsewhere using * BT_LOG_DEFINE_GLOBAL_OUTPUT_LEVEL macro, for example: * - * BT_LOG_DEFINE_GLOBAL_OUTPUT_LEVEL = BT_LOG_WARN; + * BT_LOG_DEFINE_GLOBAL_OUTPUT_LEVEL = BT_LOG_WARNING; * * This allows to specify custom value for static initialization and avoid * overhead of setting this value in runtime. @@ -559,7 +559,7 @@ static INSTRUMENTED_CONST buffer_cb g_buffer_cb = buffer_callback; return ANDROID_LOG_DEBUG; case BT_LOG_INFO: return ANDROID_LOG_INFO; - case BT_LOG_WARN: + case BT_LOG_WARNING: return ANDROID_LOG_WARN; case BT_LOG_ERROR: return ANDROID_LOG_ERROR; @@ -602,7 +602,7 @@ static INSTRUMENTED_CONST buffer_cb g_buffer_cb = buffer_callback; return 7; /* ASL_LEVEL_DEBUG / kCFLogLevelDebug */; case BT_LOG_INFO: return 6; /* ASL_LEVEL_INFO / kCFLogLevelInfo */; - case BT_LOG_WARN: + case BT_LOG_WARNING: return 4; /* ASL_LEVEL_WARNING / kCFLogLevelWarning */; case BT_LOG_ERROR: return 3; /* ASL_LEVEL_ERR / kCFLogLevelError */; @@ -708,7 +708,7 @@ static char lvl_char(const int lvl) return 'D'; case BT_LOG_INFO: return 'I'; - case BT_LOG_WARN: + case BT_LOG_WARNING: return 'W'; case BT_LOG_ERROR: return 'E'; @@ -1277,7 +1277,7 @@ static void _bt_log_write_imp( color_p = bt_common_color_fg_blue(); color_e = color_p + strlen(color_p); break; - case BT_LOG_WARN: + case BT_LOG_WARNING: color_p = bt_common_color_fg_yellow(); color_e = color_p + strlen(color_p); break; diff --git a/src/logging/log.h b/src/logging/log.h index 8fbb3cdb..236f28f5 100644 --- a/src/logging/log.h +++ b/src/logging/log.h @@ -40,7 +40,7 @@ * - BT_LOG_ERROR - happened something possible, but highly unexpected. The * process is able to recover and continue execution. * Example: out of memory (could also be FATAL if not handled properly). - * - BT_LOG_WARN - happened something that *usually* should not happen and + * - BT_LOG_WARNING - happened something that *usually* should not happen and * significantly changes application behavior for some period of time. * Example: configuration file not found, auth error. * - BT_LOG_INFO - happened significant life cycle event or major state @@ -57,7 +57,7 @@ #define BT_LOG_TRACE BT_LOGGING_LEVEL_TRACE #define BT_LOG_DEBUG BT_LOGGING_LEVEL_DEBUG #define BT_LOG_INFO BT_LOGGING_LEVEL_INFO -#define BT_LOG_WARN BT_LOGGING_LEVEL_WARN +#define BT_LOG_WARNING BT_LOGGING_LEVEL_WARNING #define BT_LOG_ERROR BT_LOGGING_LEVEL_ERROR #define BT_LOG_FATAL BT_LOGGING_LEVEL_FATAL #define BT_LOG_NONE BT_LOGGING_LEVEL_NONE @@ -648,7 +648,7 @@ bt_log_spec; #define BT_LOG_ENABLED_TRACE BT_LOG_ENABLED(BT_LOG_TRACE) #define BT_LOG_ENABLED_DEBUG BT_LOG_ENABLED(BT_LOG_DEBUG) #define BT_LOG_ENABLED_INFO BT_LOG_ENABLED(BT_LOG_INFO) -#define BT_LOG_ENABLED_WARN BT_LOG_ENABLED(BT_LOG_WARN) +#define BT_LOG_ENABLED_WARNING BT_LOG_ENABLED(BT_LOG_WARNING) #define BT_LOG_ENABLED_ERROR BT_LOG_ENABLED(BT_LOG_ERROR) #define BT_LOG_ENABLED_FATAL BT_LOG_ENABLED(BT_LOG_FATAL) @@ -672,7 +672,7 @@ bt_log_spec; #define BT_LOG_ON_TRACE BT_LOG_ON(BT_LOG_TRACE) #define BT_LOG_ON_DEBUG BT_LOG_ON(BT_LOG_DEBUG) #define BT_LOG_ON_INFO BT_LOG_ON(BT_LOG_INFO) -#define BT_LOG_ON_WARN BT_LOG_ON(BT_LOG_WARN) +#define BT_LOG_ON_WARNING BT_LOG_ON(BT_LOG_WARNING) #define BT_LOG_ON_ERROR BT_LOG_ON(BT_LOG_ERROR) #define BT_LOG_ON_FATAL BT_LOG_ON(BT_LOG_FATAL) @@ -933,17 +933,17 @@ static _BT_LOG_INLINE void _bt_log_unused(const int dummy, ...) {(void)dummy;} #define BT_LOGI_MEM_AUX(...) _BT_LOG_UNUSED(__VA_ARGS__) #endif -#if BT_LOG_ENABLED_WARN +#if BT_LOG_ENABLED_WARNING #define BT_LOGW(...) \ - BT_LOG_WRITE(BT_LOG_WARN, _BT_LOG_TAG, __VA_ARGS__) + BT_LOG_WRITE(BT_LOG_WARNING, _BT_LOG_TAG, __VA_ARGS__) #define BT_LOGW_ERRNO(...) \ - BT_LOG_WRITE_ERRNO(BT_LOG_WARN, _BT_LOG_TAG, __VA_ARGS__) + BT_LOG_WRITE_ERRNO(BT_LOG_WARNING, _BT_LOG_TAG, __VA_ARGS__) #define BT_LOGW_AUX(log, ...) \ - BT_LOG_WRITE_AUX(log, BT_LOG_WARN, _BT_LOG_TAG, __VA_ARGS__) + BT_LOG_WRITE_AUX(log, BT_LOG_WARNING, _BT_LOG_TAG, __VA_ARGS__) #define BT_LOGW_MEM(d, d_sz, ...) \ - BT_LOG_WRITE_MEM(BT_LOG_WARN, _BT_LOG_TAG, d, d_sz, __VA_ARGS__) + BT_LOG_WRITE_MEM(BT_LOG_WARNING, _BT_LOG_TAG, d, d_sz, __VA_ARGS__) #define BT_LOGW_MEM_AUX(log, d, d_sz, ...) \ - BT_LOG_WRITE_MEM_AUX(log, BT_LOG_WARN, _BT_LOG_TAG, d, d_sz, __VA_ARGS__) + BT_LOG_WRITE_MEM_AUX(log, BT_LOG_WARNING, _BT_LOG_TAG, d, d_sz, __VA_ARGS__) #else #define BT_LOGW(...) _BT_LOG_UNUSED(__VA_ARGS__) #define BT_LOGW_AUX(...) _BT_LOG_UNUSED(__VA_ARGS__) @@ -1046,7 +1046,7 @@ char bt_log_get_letter_from_level(int level) case BT_LOG_INFO: letter = 'I'; break; - case BT_LOG_WARN: + case BT_LOG_WARNING: letter = 'W'; break; case BT_LOG_ERROR: @@ -1088,7 +1088,7 @@ int bt_log_get_level_from_string(const char *str) } else if (strcmp(str, "WARN") == 0 || strcmp(str, "WARNING") == 0 || strcmp(str, "W") == 0) { - level = BT_LOG_WARN; + level = BT_LOG_WARNING; } else if (strcmp(str, "ERROR") == 0 || strcmp(str, "E") == 0) { level = BT_LOG_ERROR; diff --git a/src/plugins/comp-logging.h b/src/plugins/comp-logging.h index 61a2d271..c3402d24 100644 --- a/src/plugins/comp-logging.h +++ b/src/plugins/comp-logging.h @@ -95,7 +95,7 @@ #define BT_COMP_LOGE(_fmt, ...) \ BT_COMP_LOG(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) #define BT_COMP_LOGW(_fmt, ...) \ - BT_COMP_LOG(BT_LOG_WARN, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) + BT_COMP_LOG(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) #define BT_COMP_LOGI(_fmt, ...) \ BT_COMP_LOG(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) #define BT_COMP_LOGD(_fmt, ...) \ @@ -107,7 +107,7 @@ #define BT_COMP_LOGE_STR(_str) \ BT_COMP_LOG(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) #define BT_COMP_LOGW_STR(_str) \ - BT_COMP_LOG(BT_LOG_WARN, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) + BT_COMP_LOG(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) #define BT_COMP_LOGI_STR(_str) \ BT_COMP_LOG(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) #define BT_COMP_LOGD_STR(_str) \ @@ -119,7 +119,7 @@ #define BT_COMP_LOGE_ERRNO(_msg, _fmt, ...) \ BT_COMP_LOG_ERRNO(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) #define BT_COMP_LOGW_ERRNO(_msg, _fmt, ...) \ - BT_COMP_LOG_ERRNO(BT_LOG_WARN, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) + BT_COMP_LOG_ERRNO(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) #define BT_COMP_LOGI_ERRNO(_msg, _fmt, ...) \ BT_COMP_LOG_ERRNO(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) #define BT_COMP_LOGD_ERRNO(_msg, _fmt, ...) \ @@ -131,7 +131,7 @@ #define BT_COMP_LOGE_MEM(_data_ptr, _data_sz, _fmt, ...) \ BT_COMP_LOG_MEM(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) #define BT_COMP_LOGW_MEM(_data_ptr, _data_sz, _fmt, ...) \ - BT_COMP_LOG_MEM(BT_LOG_WARN, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) + BT_COMP_LOG_MEM(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) #define BT_COMP_LOGI_MEM(_data_ptr, _data_sz, _fmt, ...) \ BT_COMP_LOG_MEM(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) #define BT_COMP_LOGD_MEM(_data_ptr, _data_sz, _fmt, ...) \ diff --git a/src/python-plugin-provider/python-plugin-provider.c b/src/python-plugin-provider/python-plugin-provider.c index bd278e56..145d2200 100644 --- a/src/python-plugin-provider/python-plugin-provider.c +++ b/src/python-plugin-provider/python-plugin-provider.c @@ -200,7 +200,7 @@ end: #endif log_python_traceback(ret == BT_FUNC_STATUS_ERROR ? - BT_LOG_WARN : BT_LOG_INFO); + BT_LOG_WARNING : BT_LOG_INFO); pyerr_clear(); Py_XDECREF(py_bt2_py_plugin_mod); return ret; @@ -595,7 +595,7 @@ int bt_plugin_from_python_plugin_info(PyObject *plugin_info, error: BT_ASSERT(status != BT_FUNC_STATUS_OK); - log_python_traceback(fail_on_load_error ? BT_LOG_WARN : BT_LOG_INFO); + log_python_traceback(fail_on_load_error ? BT_LOG_WARNING : BT_LOG_INFO); pyerr_clear(); BT_OBJECT_PUT_REF_AND_RESET(*plugin_out); @@ -750,7 +750,7 @@ int bt_plugin_python_create_all_from_file(const char *path, error: BT_ASSERT(status != BT_FUNC_STATUS_OK); - log_python_traceback(fail_on_load_error ? BT_LOG_WARN : BT_LOG_INFO); + log_python_traceback(fail_on_load_error ? BT_LOG_WARNING : BT_LOG_INFO); pyerr_clear(); BT_OBJECT_PUT_REF_AND_RESET(*plugin_set_out); diff --git a/tests/bindings/python/bt2/test_component.py b/tests/bindings/python/bt2/test_component.py index 44651728..4384c665 100644 --- a/tests/bindings/python/bt2/test_component.py +++ b/tests/bindings/python/bt2/test_component.py @@ -115,8 +115,8 @@ class GenericComponentTestCase(unittest.TestCase): def _consume(self): pass - comp = self._create_comp(MySink, 'yaes', bt2.LoggingLevel.WARN) - self.assertEqual(comp.logging_level, bt2.LoggingLevel.WARN) + comp = self._create_comp(MySink, 'yaes', bt2.LoggingLevel.WARNING) + self.assertEqual(comp.logging_level, bt2.LoggingLevel.WARNING) def test_class(self): class MySink(bt2._UserSinkComponent): diff --git a/tests/bindings/python/bt2/test_component_class.py b/tests/bindings/python/bt2/test_component_class.py index a8577599..73f0439b 100644 --- a/tests/bindings/python/bt2/test_component_class.py +++ b/tests/bindings/python/bt2/test_component_class.py @@ -241,8 +241,8 @@ class UserComponentClassTestCase(unittest.TestCase): query_log_level = None res = bt2.QueryExecutor().query(MySink, 'obj', None, - bt2.LoggingLevel.WARN) - self.assertEqual(query_log_level, bt2.LoggingLevel.WARN) + bt2.LoggingLevel.WARNING) + self.assertEqual(query_log_level, bt2.LoggingLevel.WARNING) del query_log_level def test_query_simple(self): diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_bin_info.c b/tests/plugins/flt.lttng-utils.debug-info/test_bin_info.c index 36bfd7f0..38848f21 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_bin_info.c +++ b/tests/plugins/flt.lttng-utils.debug-info/test_bin_info.c @@ -21,7 +21,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define BT_LOG_OUTPUT_LEVEL BT_LOG_WARN +#define BT_LOG_OUTPUT_LEVEL BT_LOG_WARNING #define BT_LOG_TAG "TEST/BIN-INFO" #include "logging/log.h"