weston_compositor_add_log_scope() declaration is confusing
The declaration is
struct weston_log_scope *
weston_compositor_add_log_scope(struct weston_log_context *compositor,
const char *name,
const char *description,
weston_log_scope_cb new_subscriber,
void *user_data);
Problems:
- The function is named
weston_compositor_...
but it does not take astruct weston_compositor *
. - The first argument is of type
struct weston_log_context *
but namedcompositor
.
I think we should have also a real weston_compositor_add_log_scope(struct weston_compositor *, ...)
for the times when we already have a weston_compositor
at hand. Accessing weston_compositor::weston_log_ctx
in non-core code is a bit icky.