log format
This commit is contained in:
parent
fcf74df6a1
commit
db9684debc
1 changed files with 3 additions and 4 deletions
|
|
@ -52,14 +52,13 @@ func (f *CustomFormatter) Format(entry *logrus.Entry) ([]byte, error) {
|
|||
errVal = fmt.Sprintf("%v\n", errVal)
|
||||
}
|
||||
|
||||
fieldsLine := "| params: "
|
||||
fieldsLine := "\n"
|
||||
fields := entry.Data
|
||||
if fields != nil {
|
||||
if len(fields) > 0 {
|
||||
fieldsLine = "| params: "
|
||||
for key, val := range fields {
|
||||
fieldsLine += fmt.Sprintf("\t%v=%v ", key, val)
|
||||
}
|
||||
} else {
|
||||
fieldsLine = "\n"
|
||||
}
|
||||
|
||||
cyanCode := f.getLevelColor(logrus.TraceLevel)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue