entry: break out time, level and message from data

This commit is contained in:
Simon Eskildsen
2014-07-26 21:26:04 -04:00
parent f0cb18fc85
commit 40069a98d6
6 changed files with 98 additions and 3 deletions
+3
View File
@@ -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)