Skip to content

Commit

Permalink
Add call depth to Pion logger (#536)
Browse files Browse the repository at this point in the history
Currently all pion logs are showing a caller within the logger itself, which is incorrect
  • Loading branch information
davidzhao authored Dec 2, 2023
1 parent ec88d89 commit afa0350
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logger/pionlogger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func NewLoggerFactory(logger logger.Logger) *LoggerFactory {

func (f *LoggerFactory) NewLogger(scope string) logging.LeveledLogger {
return &logAdapter{
logger: f.logger.WithComponent("pion." + scope),
logger: f.logger.WithComponent("pion." + scope).WithCallDepth(1),
ignoredPrefixes: pionIgnoredPrefixes[scope],
}
}

0 comments on commit afa0350

Please sign in to comment.