From 1211a81aad18bbc4d9e8fb9973238ad8e7e1f688 Mon Sep 17 00:00:00 2001 From: M Stoeckl Date: Sun, 20 Jan 2019 13:51:12 -0500 Subject: Replace wlr_log with sway_log This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag. --- sway/tree/output.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sway/tree/output.c') diff --git a/sway/tree/output.c b/sway/tree/output.c index b79e70d4..7fbeeebd 100644 --- a/sway/tree/output.c +++ b/sway/tree/output.c @@ -97,7 +97,7 @@ void output_enable(struct sway_output *output, struct output_config *oc) { if (!output->workspaces->length) { // Create workspace char *ws_name = workspace_next_name(wlr_output->name); - wlr_log(WLR_DEBUG, "Creating default workspace %s", ws_name); + sway_log(SWAY_DEBUG, "Creating default workspace %s", ws_name); ws = workspace_create(output, ws_name); // Set each seat's focus if not already set struct sway_seat *seat = NULL; @@ -212,7 +212,7 @@ void output_disable(struct sway_output *output) { if (!sway_assert(output->enabled, "Expected an enabled output")) { return; } - wlr_log(WLR_DEBUG, "Disabling output '%s'", output->wlr_output->name); + sway_log(SWAY_DEBUG, "Disabling output '%s'", output->wlr_output->name); wl_signal_emit(&output->events.destroy, output); output_evacuate(output); @@ -237,7 +237,7 @@ void output_begin_destroy(struct sway_output *output) { if (!sway_assert(!output->enabled, "Expected a disabled output")) { return; } - wlr_log(WLR_DEBUG, "Destroying output '%s'", output->wlr_output->name); + sway_log(SWAY_DEBUG, "Destroying output '%s'", output->wlr_output->name); output->node.destroying = true; node_set_dirty(&output->node); @@ -258,11 +258,11 @@ struct output_config *output_find_config(struct sway_output *output) { if (strcasecmp(name, cur->name) == 0 || strcasecmp(identifier, cur->name) == 0) { - wlr_log(WLR_DEBUG, "Matched output config for %s", name); + sway_log(SWAY_DEBUG, "Matched output config for %s", name); oc = cur; } if (strcasecmp("*", cur->name) == 0) { - wlr_log(WLR_DEBUG, "Matched wildcard output config for %s", name); + sway_log(SWAY_DEBUG, "Matched wildcard output config for %s", name); all = cur; } -- cgit v1.2.3