aboutsummaryrefslogtreecommitdiff
path: root/swaybar/bar.c
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2019-01-20 13:51:12 -0500
committerFurkan Sahin <furkan-dev@proton.me>2019-01-20 13:51:12 -0500
commit41c2c51f6151b6b5d86902c51d0ffb241688bd82 (patch)
tree5c3f60e0219cb8b4a1b7cafb760a871661866e32 /swaybar/bar.c
parent6f1ef5dd2ae739878a91e19bbfaef038d6d3fa83 (diff)
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.
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r--swaybar/bar.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index d36367fc..a1f7bfdb 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -10,7 +10,6 @@
#include <unistd.h>
#include <wayland-client.h>
#include <wayland-cursor.h>
-#include <wlr/util/log.h>
#include "config.h"
#include "swaybar/bar.h"
#include "swaybar/config.h"
@@ -44,7 +43,7 @@ static void swaybar_output_free(struct swaybar_output *output) {
if (!output) {
return;
}
- wlr_log(WLR_DEBUG, "Removing output %s", output->name);
+ sway_log(SWAY_DEBUG, "Removing output %s", output->name);
if (output->layer_surface != NULL) {
zwlr_layer_surface_v1_destroy(output->layer_surface);
}
@@ -157,7 +156,7 @@ bool determine_bar_visibility(struct swaybar *bar, bool moving_layer) {
bar->visible = visible;
if (bar->status) {
- wlr_log(WLR_DEBUG, "Sending %s signal to status command",
+ sway_log(SWAY_DEBUG, "Sending %s signal to status command",
visible ? "cont" : "stop");
kill(bar->status->pid, visible ?
bar->status->cont_signal : bar->status->stop_signal);
@@ -271,7 +270,7 @@ static void xdg_output_handle_description(void *data,
size_t length = paren - description;
output->identifier = malloc(length);
if (!output->identifier) {
- wlr_log(WLR_ERROR, "Failed to allocate output identifier");
+ sway_log(SWAY_ERROR, "Failed to allocate output identifier");
return;
}
strncpy(output->identifier, description, length);