Skip to content

Commit

Permalink
Remove the serializer
Browse files Browse the repository at this point in the history
The serializer isn't needed since all it does is create a clone of the
existing logger.
  • Loading branch information
ankur22 committed Feb 14, 2024
1 parent 92ad356 commit b90c091
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
3 changes: 0 additions & 3 deletions common/frame_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ type FrameSession struct {
vu k6modules.VU

logger *log.Logger
// logger that will properly serialize RemoteObject instances
serializer *log.Logger

// Keep a reference to the main frame span so we can end it
// when FrameSession.ctx is Done
Expand Down Expand Up @@ -105,7 +103,6 @@ func NewFrameSession(
vu: k6ext.GetVU(ctx),
k6Metrics: k6Metrics,
logger: l,
serializer: l.ConsoleLogFormatterSerializer(),
}

var parentNM *NetworkManager
Expand Down
13 changes: 0 additions & 13 deletions log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,6 @@ func (l *Logger) ReportCaller() {
l.SetReportCaller(true)
}

// ConsoleLogFormatterSerializer creates a new logger that will
// correctly serialize RemoteObject instances.
func (l *Logger) ConsoleLogFormatterSerializer() *Logger {
return &Logger{
Logger: &logrus.Logger{
Out: l.Out,
Level: l.Level,
Formatter: l.Formatter,
Hooks: l.Hooks,
},
}
}

// SetCategoryFilter enables filtering logs by the filter regex.
func (l *Logger) SetCategoryFilter(filter string) (err error) {
if filter == "" {
Expand Down

0 comments on commit b90c091

Please sign in to comment.