server, cdp: improve logging

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier
2024-10-15 22:57:56 +02:00
parent 84c49fbe34
commit 8e05f09fc8
12 changed files with 180 additions and 45 deletions

View File

@@ -24,6 +24,8 @@ const cdp = @import("cdp.zig");
const result = cdp.result;
const getMsg = cdp.getMsg;
const log = std.log.scoped(.cdp);
const Methods = enum {
enable,
};
@@ -49,7 +51,10 @@ fn enable(
scanner: *std.json.Scanner,
_: *Ctx,
) ![]const u8 {
// input
const msg = try getMsg(alloc, _id, void, scanner);
log.debug("Req > id {d}, method {s}", .{ msg.id, "performance.enable" });
return result(alloc, msg.id, null, null, msg.sessionID);
}