Skip to content

Commit

Permalink
Refactor onConsoleAPICalled log fields
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ka3de committed Jul 24, 2023
1 parent 1a7f8e5 commit a090ffc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/frame_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@ func (fs *FrameSession) navigateFrame(frame *Frame, url, referrer string) (strin
func (fs *FrameSession) onConsoleAPICalled(event *cdpruntime.EventConsoleAPICalled) {
l := fs.serializer.
WithTime(event.Timestamp.Time()).
WithField("source", "browser-console-api")
WithField("source", "browser").
WithField("browser_source", "console-api")

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

0 comments on commit a090ffc

Please sign in to comment.