entry: break out time, level and message from data
This commit is contained in:
@@ -27,11 +27,15 @@ func miniTS() int {
|
||||
type TextFormatter struct {
|
||||
// Set to true to bypass checking for a TTY before outputting colors.
|
||||
ForceColors bool
|
||||
|
||||
*internalFormatter
|
||||
}
|
||||
|
||||
func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
|
||||
b := &bytes.Buffer{}
|
||||
|
||||
f.prefixFieldClashes(entry)
|
||||
|
||||
if f.ForceColors || IsTerminal() {
|
||||
levelText := strings.ToUpper(entry.Data["level"].(string))[0:4]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user