Skip to content

Commit c193255

Browse files
committed
log: SetFormat: include returns in switch
Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 40ee5fb) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent c3c22f8 commit c193255

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

log/context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ func SetFormat(format string) error {
8989
TimestampFormat: RFC3339NanoFixed,
9090
FullTimestamp: true,
9191
})
92+
return nil
9293
case JSONFormat:
9394
logrus.SetFormatter(&logrus.JSONFormatter{
9495
TimestampFormat: RFC3339NanoFixed,
9596
})
97+
return nil
9698
default:
9799
return fmt.Errorf("unknown log format: %s", format)
98100
}
99-
100-
return nil
101101
}
102102

103103
// WithLogger returns a new context with the provided logger. Use in

0 commit comments

Comments
 (0)