From 4e03629f44cf12d58d50db8ee7aa66d8489c646b Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Tue, 9 Jul 2019 00:36:20 +0300 Subject: [PATCH] libweston: Remove internal weston-log set-up function out of public header We have dedicated header for the internal parts of the logging framework, use that for the set-up part instead of the libweston public API header. Further more this removes weston_vlog() from public header as well and moves them to weston-log-internal.h file. Signed-off-by: Marius Vlad --- include/libweston/libweston.h | 8 -------- libweston/compositor.c | 2 ++ libweston/libinput-seat.c | 1 + libweston/weston-log-internal.h | 8 ++++++++ 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index a6ae591b..b13bea63 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -1816,10 +1816,6 @@ typedef int (*log_func_t)(const char *fmt, va_list ap); void weston_log_set_handler(log_func_t log, log_func_t cont); int -weston_vlog(const char *fmt, va_list ap); -int -weston_vlog_continue(const char *fmt, va_list ap); -int weston_log(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); int @@ -2037,10 +2033,6 @@ weston_compositor_enable_touch_calibrator(struct weston_compositor *compositor, struct weston_log_context * weston_log_ctx_compositor_create(void); -int -weston_log_ctx_compositor_setup(struct weston_compositor *compositor, - struct weston_log_context *log_ctx); - void weston_log_ctx_compositor_destroy(struct weston_compositor *compositor); diff --git a/libweston/compositor.c b/libweston/compositor.c index be719ae6..85327159 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -75,6 +75,8 @@ #include "backend.h" #include "libweston-internal.h" +#include "weston-log-internal.h" + /** * \defgroup head Head * \defgroup output Output diff --git a/libweston/libinput-seat.c b/libweston/libinput-seat.c index 76ba63e6..98015518 100644 --- a/libweston/libinput-seat.c +++ b/libweston/libinput-seat.c @@ -37,6 +37,7 @@ #include #include "backend.h" #include "libweston-internal.h" +#include "weston-log-internal.h" #include "launcher-util.h" #include "libinput-seat.h" #include "libinput-device.h" diff --git a/libweston/weston-log-internal.h b/libweston/weston-log-internal.h index 265c0d3f..7d6e3802 100644 --- a/libweston/weston-log-internal.h +++ b/libweston/weston-log-internal.h @@ -93,5 +93,13 @@ weston_log_run_cb_new_subscriber(struct weston_log_subscription *sub); void weston_debug_protocol_advertise_scopes(struct weston_log_context *log_ctx, struct wl_resource *res); +int +weston_log_ctx_compositor_setup(struct weston_compositor *compositor, + struct weston_log_context *log_ctx); + +int +weston_vlog(const char *fmt, va_list ap); +int +weston_vlog_continue(const char *fmt, va_list ap); #endif /* WESTON_LOG_INTERNAL_H */