koji: make function non-member
follow-up to PR-2397
This commit is contained in:
parent
4f00081356
commit
e6475d0e0e
1 changed files with 5 additions and 5 deletions
|
|
@ -8,7 +8,7 @@ type LeveledLogrus struct {
|
|||
*logrus.Logger
|
||||
}
|
||||
|
||||
func (l *LeveledLogrus) fields(keysAndValues ...interface{}) map[string]interface{} {
|
||||
func fields(keysAndValues ...interface{}) map[string]interface{} {
|
||||
fields := make(map[string]interface{})
|
||||
|
||||
for i := 0; i < len(keysAndValues)-1; i += 2 {
|
||||
|
|
@ -19,16 +19,16 @@ func (l *LeveledLogrus) fields(keysAndValues ...interface{}) map[string]interfac
|
|||
}
|
||||
|
||||
func (l *LeveledLogrus) Error(msg string, keysAndValues ...interface{}) {
|
||||
l.WithFields(l.fields(keysAndValues...)).Error(msg)
|
||||
l.WithFields(fields(keysAndValues...)).Error(msg)
|
||||
}
|
||||
|
||||
func (l *LeveledLogrus) Info(msg string, keysAndValues ...interface{}) {
|
||||
l.WithFields(l.fields(keysAndValues...)).Info(msg)
|
||||
l.WithFields(fields(keysAndValues...)).Info(msg)
|
||||
}
|
||||
func (l *LeveledLogrus) Debug(msg string, keysAndValues ...interface{}) {
|
||||
l.WithFields(l.fields(keysAndValues...)).Debug(msg)
|
||||
l.WithFields(fields(keysAndValues...)).Debug(msg)
|
||||
}
|
||||
|
||||
func (l *LeveledLogrus) Warn(msg string, keysAndValues ...interface{}) {
|
||||
l.WithFields(l.fields(keysAndValues...)).Warn(msg)
|
||||
l.WithFields(fields(keysAndValues...)).Warn(msg)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue