Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 4518aed

Browse files
committed
Refactor onConsoleAPICalled log fields
In order to be consistent with the usage of 'source:browser' log fields across all logs generated from the browser extension, this commit replaces the current 'source' log field for onConsoleAPICalled logger, which was previously set to 'browser-console-api', to 'browser'. Also moves and modifies the previous 'browser-console-api' to be set as 'console-api' for the 'browser_source' keyed field, which is currently also used in the 'onLogEntryAdded' method logger.
1 parent 2f4b5c3 commit 4518aed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/frame_session.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,8 @@ func (fs *FrameSession) navigateFrame(frame *Frame, url, referrer string) (strin
582582
func (fs *FrameSession) onConsoleAPICalled(event *cdpruntime.EventConsoleAPICalled) {
583583
l := fs.serializer.
584584
WithTime(event.Timestamp.Time()).
585-
WithField("source", "browser-console-api")
585+
WithField("source", "browser").
586+
WithField("browser_source", "console-api")
586587

587588
/* accessing the state Group while not on the eventloop is racy
588589
if s := fs.vu.State(); s.Group.Path != "" {

0 commit comments

Comments
 (0)