entry: break out time, level and message from data
This commit is contained in:
@@ -6,9 +6,12 @@ import (
|
||||
)
|
||||
|
||||
type JSONFormatter struct {
|
||||
*internalFormatter
|
||||
}
|
||||
|
||||
func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
|
||||
f.prefixFieldClashes(entry)
|
||||
|
||||
serialized, err := json.Marshal(entry.Data)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
|
||||
|
||||
Reference in New Issue
Block a user