fix panic: nil pointer dereference
@@ -153,9 +153,11 @@ func WithError(err error) Logger {
func (l *logger) Print(msg string, fields ...field.M) {
logFields := make(logrus.Fields)
+ if envVarFields != nil {
for _, f := range envVarFields.Fields() {
logFields[f.Key()] = f.Value()
}
+ }
frame := caller.GetFrame(3)
logFields["Function"] = frame.Function
