*/
static const char* log_level_env_var_names[] = {
"BABELTRACE_FLT_LTTNG_UTILS_DEBUG_INFO_LOG_LEVEL",
- "BABELTRACE_FLT_UTILS_COUNTER_LOG_LEVEL",
"BABELTRACE_FLT_UTILS_MUXER_LOG_LEVEL",
"BABELTRACE_FLT_UTILS_TRIMMER_LOG_LEVEL",
"BABELTRACE_PLUGIN_CTF_BFCR_LOG_LEVEL",
noinst_LTLIBRARIES = libbabeltrace2-plugin-counter-cc.la
libbabeltrace2_plugin_counter_cc_la_SOURCES = \
counter.c \
- counter.h \
- logging.c \
- logging.h
+ counter.h
* SOFTWARE.
*/
+#define BT_LOG_OUTPUT_LEVEL (counter->log_level)
#define BT_LOG_TAG "PLUGIN/FLT.UTILS.COUNTER"
-#include "logging.h"
+#include "logging/log.h"
#include <babeltrace2/babeltrace.h>
#include "common/macros.h"
goto error;
}
+ counter->log_level = bt_component_get_logging_level(
+ bt_self_component_as_component(
+ bt_self_component_sink_as_self_component(component)));
ret = bt_self_component_sink_add_input_port(component,
"in", NULL, NULL);
if (ret != BT_SELF_COMPONENT_STATUS_OK) {
uint64_t at;
uint64_t step;
bool hide_zero;
+ bt_logging_level log_level;
};
BT_HIDDEN
+++ /dev/null
-/*
- * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#define BT_LOG_OUTPUT_LEVEL bt_plugin_utils_counter_log_level
-#include "logging/log.h"
-
-BT_LOG_INIT_LOG_LEVEL(bt_plugin_utils_counter_log_level,
- "BABELTRACE_FLT_UTILS_COUNTER_LOG_LEVEL");
+++ /dev/null
-#ifndef PLUGINS_UTILS_COUNTER_LOGGING_H
-#define PLUGINS_UTILS_COUNTER_LOGGING_H
-
-/*
- * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#define BT_LOG_OUTPUT_LEVEL bt_plugin_utils_counter_log_level
-#include "logging/log.h"
-
-BT_LOG_LEVEL_EXTERN_SYMBOL(bt_plugin_utils_counter_log_level);
-
-#endif /* PLUGINS_UTILS_COUNTER_LOGGING_H */