Format formats a log entry onto bytes
(entry *logrus.Entry)
| 19 | |
| 20 | // Format formats a log entry onto bytes |
| 21 | func (f *TextFormatter) Format(entry *logrus.Entry) ([]byte, error) { |
| 22 | bytes, err := f.TextFormatter.Format(entry) |
| 23 | name := color.New(color.Bold).Sprintf("[%s]", f.LoggerName) |
| 24 | return []byte(fmt.Sprintf("%s\t %s", name, bytes)), err |
| 25 | } |
| 26 | |
| 27 | // NewLogger is the constructor for a new Logger object with the given name |
| 28 | func NewLogger(name string) *logrus.Logger { |
no outgoing calls