(entry *logrus.Entry)
| 13 | } |
| 14 | |
| 15 | func (f *Formatter) Format(entry *logrus.Entry) ([]byte, error) { |
| 16 | msg := bytes.NewBuffer(nil) |
| 17 | fmt.Fprintf(msg, "%s: %s", strings.ToUpper(entry.Level.String()), entry.Message) |
| 18 | if v, ok := entry.Data[logrus.ErrorKey]; ok { |
| 19 | fmt.Fprintf(msg, ": %v", v) |
| 20 | } |
| 21 | fmt.Fprintf(msg, "\n") |
| 22 | return msg.Bytes(), nil |
| 23 | } |
no test coverage detected