Skip to content

Commit

Permalink
Add browser extension log field
Browse files Browse the repository at this point in the history
This log field allows to distinguish log messages generated by
xk6-browser extension from messages generated by k6 core.
  • Loading branch information
ka3de committed Jul 18, 2023
1 parent 44fce67 commit 09b17c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ func (l *Logger) Logf(level logrus.Level, category string, msg string, args ...a
return
}
fields := logrus.Fields{
"category": category,
"elapsed": fmt.Sprintf("%d ms", elapsed),
"extension": "browser",
"category": category,
"elapsed": fmt.Sprintf("%d ms", elapsed),
}
if l.iterID != "" && l.GetLevel() > logrus.InfoLevel {
fields["iteration_id"] = l.iterID
Expand Down

0 comments on commit 09b17c0

Please sign in to comment.