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

@@ -25,6 +25,8 @@ const result = cdp.result;
const getMsg = cdp.getMsg;
const stringify = cdp.stringify;
const log_cdp = std.log.scoped(.cdp);
const Methods = enum {
enable,
};
@@ -51,6 +53,7 @@ fn enable(
_: *Ctx,
) ![]const u8 {
const msg = try getMsg(alloc, _id, void, scanner);
log_cdp.debug("Req > id {d}, method {s}", .{ msg.id, "log.enable" });
return result(alloc, msg.id, null, null, msg.sessionID);
}