Skip to content

Commit 4df48c9

Browse files
authored
Merge pull request #935 from lightpanda-io/mouse-event-log
use internal logger instead of std.log
2 parents 05ad77f + f09caec commit 4df48c9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/browser/events/mouse_event.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// along with this program. If not, see <https://www.gnu.org/licenses/>.
1818

1919
const std = @import("std");
20-
const log = std.log.scoped(.mouse_event);
20+
const log = @import("../../log.zig");
2121

2222
const parser = @import("../netsurf.zig");
2323
const Event = @import("event.zig").Event;
@@ -69,7 +69,7 @@ pub const MouseEvent = struct {
6969
});
7070

7171
if (!std.mem.eql(u8, event_type, "click")) {
72-
log.warn("MouseEvent currently only supports listeners for 'click' events!", .{});
72+
log.warn(.mouse_event, "unsupported mouse event", .{ .event = event_type });
7373
}
7474

7575
return mouse_event;

src/log.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ pub const Scope = enum {
4040
web_api,
4141
xhr,
4242
polyfill,
43+
mouse_event,
4344
};
4445

4546
const Opts = struct {

0 commit comments

Comments
 (0)