fix unreachable code & missing stringer-generated code

This commit is contained in:
Christian Schwarz
2017-09-30 16:31:55 +02:00
parent 6199595602
commit 0cbee78b40
12 changed files with 53 additions and 24 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ func (l Level) String() string {
case Error:
return "error"
default:
return fmt.Sprintf("%s", l)
return fmt.Sprintf("%s", string(l))
}
}
+1 -1
View File
@@ -72,7 +72,7 @@ func (l *Logger) WithField(field string, val interface{}) *Logger {
defer l.mtx.Unlock()
if _, ok := l.fields[field]; ok {
fmt.Fprintf(os.Stderr, "%s caller overwrites field '%s'. Stack:\n%s\n", InternalErrorPrefix, string(debug.Stack()))
fmt.Fprintf(os.Stderr, "%s caller overwrites field '%s'. Stack:\n%s\n", InternalErrorPrefix, field, string(debug.Stack()))
}
child := &Logger{