data-stream.c lttng-live-internal.h \
data-stream.h metadata.c metadata.h \
viewer-connection.c viewer-connection.h \
- lttng-viewer-abi.h
+ lttng-viewer-abi.h \
+ logging.c logging.h
noinst_LTLIBRARIES = libbabeltrace-plugin-ctf-lttng-live.la
* SOFTWARE.
*/
+#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE-SRC-DS"
+#include "logging.h"
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "../common/notif-iter/notif-iter.h"
#include <assert.h>
-#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE-DS"
-
#include "data-stream.h"
static
--- /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 lttng_live_log_level
+#include <babeltrace/logging-internal.h>
+
+BT_LOG_INIT_LOG_LEVEL(lttng_live_log_level, "BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_SRC_LOG_LEVEL");
--- /dev/null
+#ifndef LTTNG_LIVE_LOGGING_H
+#define LTTNG_LIVE_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 lttng_live_log_level
+#include <babeltrace/logging-internal.h>
+
+BT_LOG_LEVEL_EXTERN_SYMBOL(lttng_live_log_level);
+
+#endif /* LTTNG_LIVE_LOGGING_H */
* SOFTWARE.
*/
-extern int bt_lttng_live_log_level;
-
#include <stdbool.h>
#include <babeltrace/babeltrace-internal.h>
-
-#define BT_LOG_OUTPUT_LEVEL bt_lttng_live_log_level
-#include <babeltrace/logging-internal.h>
-
#include <babeltrace/graph/component.h>
#include <babeltrace/graph/notification-iterator.h>
#include <babeltrace/graph/clock-class-priority-map.h>
* SOFTWARE.
*/
+#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE-SRC"
+#include "logging.h"
+
#include <babeltrace/ctf-ir/packet.h>
#include <babeltrace/graph/component-source.h>
#include <babeltrace/graph/private-port.h>
#include <unistd.h>
#include <plugins-common.h>
-#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE"
-#define BT_LOGLEVEL_NAME "BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_LOG_LEVEL"
-
#include "data-stream.h"
#include "metadata.h"
#include "lttng-live-internal.h"
print_state(stream), stream->last_returned_inactivity_timestamp, \
stream->current_inactivity_timestamp)
-BT_HIDDEN
-int bt_lttng_live_log_level = BT_LOG_NONE;
-
BT_HIDDEN
int lttng_live_add_port(struct lttng_live_component *lttng_live,
struct lttng_live_stream_iterator *stream_iter)
bt_put(self_port);
return status;
}
-
-static
-void __attribute__((constructor)) bt_lttng_live_logging_ctor(void)
-{
- bt_lttng_live_log_level = bt_log_get_level_from_env(BT_LOGLEVEL_NAME);
-}
* SOFTWARE.
*/
+#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE-SRC-METADATA"
+#include "logging.h"
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <babeltrace/compat/memstream-internal.h>
#include <babeltrace/graph/graph.h>
-#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE-METADATA"
-
#include "metadata.h"
#include "../common/metadata/decoder.h"
* SOFTWARE.
*/
+#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE-SRC-VIEWER"
+#include "logging.h"
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <babeltrace/common-internal.h>
#include <babeltrace/graph/graph.h>
-#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE-VIEWER"
-
#include "lttng-live-internal.h"
#include "viewer-connection.h"
#include "lttng-viewer-abi.h"