aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-04-04 16:48:21 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-04-04 16:51:14 +0200
commitf17792183bb0972ba71c84b49366e71fdddc3c5f (patch)
treedcc98cda0256500c9107ea5852e6d60f9de8db35 /src
parent8d68d1e7cf8782fe337e6f605d394a1df8b5d36d (diff)
downloadriver-f17792183bb0972ba71c84b49366e71fdddc3c5f.tar.gz
river-f17792183bb0972ba71c84b49366e71fdddc3c5f.tar.xz
Add a bit of logging for transactions
Diffstat (limited to 'src')
-rw-r--r--src/root.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/root.zig b/src/root.zig
index 14935b2..c88557d 100644
--- a/src/root.zig
+++ b/src/root.zig
@@ -258,6 +258,11 @@ pub const Root = struct {
}
}
+ Log.Debug.log(
+ "Started transaction with {} pending configures.",
+ .{self.pending_configures},
+ );
+
if (self.pending_configures > 0) {
// TODO: log failure to create timer and commit immediately
self.transaction_timer = c.wl_event_loop_add_timer(
@@ -277,7 +282,8 @@ pub const Root = struct {
fn handle_timeout(data: ?*c_void) callconv(.C) c_int {
const root = @ptrCast(*Root, @alignCast(@alignOf(*Root), data));
- // TODO: log warning
+ Log.Error.log("Transaction timed out. Some imperfect frames may be shown.", .{});
+
root.commitTransaction();
return 0;