func (f *CustomFormatter) Format(entry *logrus.Entry) ([]byte, error) {
	values := make([]interface{}, len(f.Handlers))
	for i, handler := range f.Handlers {
		value, err := handler(entry, f)
		if err != nil {
			return nil, err
		}
		values[i] = value
	}
	parsed := f.Sprintf(values...)
	return bytes.NewBufferString(parsed).Bytes(), nil
}
Format is called by logrus and returns the formatted string.
package lcf
import (
	"bytes"
	"runtime"
	"time"
	"github.com/sirupsen/logrus"
)
const (
	Basic = "%[levelName]s:%[name]s:%[message]s%[fields]s\n"
	Message = "%[message]s\n"
	Detailed = "%[ascTime]s %-5[process]d %-7[levelName]s %-20[name]s %[message]s%[fields]s\n"
	DefaultTimestampFormat = "2006-01-02 15:04:05.000"
)
type CustomFormatter struct {
	Template string
	Handlers []Handler
	Attributes Attributes
	ForceColors bool
	DisableColors bool
	TimestampFormat string
	DisableSorting bool
	ColorDebug int
	ColorInfo  int
	ColorWarn  int
	ColorError int
	ColorFatal int
	ColorPanic int
	handleColors [][3]int
	startTime    time.Time
}