Skip to content

Commit

Permalink
Fix creation of logger with new setting
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiDog committed Nov 6, 2023
1 parent 2a5edf0 commit a72d3ff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ func (c *Logger) GetLogger() logr.Logger {
}

func (c *Logger) WithValues(keysAndValues ...any) *Logger {
c.logger = c.logger.WithValues(keysAndValues...)
return c
return &Logger{
logger: c.logger.WithValues(keysAndValues...),
}
}

func (c *Logger) WithName(name string) *Logger {
c.logger = c.logger.WithName(name)
return c
return &Logger{
logger: c.logger.WithName(name),
}
}

0 comments on commit a72d3ff

Please sign in to comment.