mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 13:40:22 +03:00
committed by
Harshavardhana
parent
37cbcae6ba
commit
9358ee011b
+3
-2
@@ -67,9 +67,10 @@ func errorIf(err error, msg string, data ...interface{}) {
|
||||
fields := logrus.Fields{
|
||||
"cause": err.Error(),
|
||||
}
|
||||
if globalTrace {
|
||||
fields["stack"] = "\n" + stackInfo()
|
||||
if e, ok := err.(*Error); ok {
|
||||
fields["stack"] = strings.Join(e.Trace(), " ")
|
||||
}
|
||||
|
||||
log.WithFields(fields).Errorf(msg, data...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user