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.
This commit is contained in:
M Stoeckl 2019-01-20 13:51:12 -05:00 committed by emersion
parent 5c834d36e1
commit 1211a81aad
108 changed files with 613 additions and 504 deletions

View file

@ -16,7 +16,7 @@ struct cmd_results *input_cmd_xkb_layout(int argc, char **argv) {
ic->xkb_layout = strdup(argv[0]);
wlr_log(WLR_DEBUG, "set-xkb_layout for config: %s layout: %s",
sway_log(SWAY_DEBUG, "set-xkb_layout for config: %s layout: %s",
ic->identifier, ic->xkb_layout);
return cmd_results_new(CMD_SUCCESS, NULL);
}

View file

@ -16,7 +16,7 @@ struct cmd_results *input_cmd_xkb_model(int argc, char **argv) {
ic->xkb_model = strdup(argv[0]);
wlr_log(WLR_DEBUG, "set-xkb_model for config: %s model: %s",
sway_log(SWAY_DEBUG, "set-xkb_model for config: %s model: %s",
ic->identifier, ic->xkb_model);
return cmd_results_new(CMD_SUCCESS, NULL);
}

View file

@ -16,7 +16,7 @@ struct cmd_results *input_cmd_xkb_options(int argc, char **argv) {
ic->xkb_options = strdup(argv[0]);
wlr_log(WLR_DEBUG, "set-xkb_options for config: %s options: %s",
sway_log(SWAY_DEBUG, "set-xkb_options for config: %s options: %s",
ic->identifier, ic->xkb_options);
return cmd_results_new(CMD_SUCCESS, NULL);
}

View file

@ -16,7 +16,7 @@ struct cmd_results *input_cmd_xkb_rules(int argc, char **argv) {
ic->xkb_rules = strdup(argv[0]);
wlr_log(WLR_DEBUG, "set-xkb_rules for config: %s rules: %s",
sway_log(SWAY_DEBUG, "set-xkb_rules for config: %s rules: %s",
ic->identifier, ic->xkb_rules);
return cmd_results_new(CMD_SUCCESS, NULL);
}

View file

@ -16,7 +16,7 @@ struct cmd_results *input_cmd_xkb_variant(int argc, char **argv) {
ic->xkb_variant = strdup(argv[0]);
wlr_log(WLR_DEBUG, "set-xkb_variant for config: %s variant: %s",
sway_log(SWAY_DEBUG, "set-xkb_variant for config: %s variant: %s",
ic->identifier, ic->xkb_variant);
return cmd_results_new(CMD_SUCCESS, NULL);
}