mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 13:40:22 +03:00
logging: Enable logging across storage fs layer. (#1367)
Adds log.Debugf at all the layer - fixes #1074
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
d63d17012d
commit
e9fba04b36
@@ -43,12 +43,12 @@ type logger struct {
|
||||
}
|
||||
|
||||
// errorIf synonymous with fatalIf but doesn't exit on error != nil
|
||||
func errorIf(err *probe.Error, msg string, fields map[string]interface{}) {
|
||||
func errorIf(err *probe.Error, msg string, fields logrus.Fields) {
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
if fields == nil {
|
||||
fields = make(map[string]interface{})
|
||||
fields = make(logrus.Fields)
|
||||
}
|
||||
fields["Error"] = struct {
|
||||
Cause string `json:"cause,omitempty"`
|
||||
@@ -65,12 +65,12 @@ func errorIf(err *probe.Error, msg string, fields map[string]interface{}) {
|
||||
}
|
||||
|
||||
// fatalIf wrapper function which takes error and prints jsonic error messages.
|
||||
func fatalIf(err *probe.Error, msg string, fields map[string]interface{}) {
|
||||
func fatalIf(err *probe.Error, msg string, fields logrus.Fields) {
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
if fields == nil {
|
||||
fields = make(map[string]interface{})
|
||||
fields = make(logrus.Fields)
|
||||
}
|
||||
|
||||
fields["error"] = err.ToGoError()
|
||||
|
||||
Reference in New Issue
Block a user