Skip to content

Commit

Permalink
json: don't print the msg/time/level in the fields
Browse files Browse the repository at this point in the history
  • Loading branch information
aybabtme committed Apr 12, 2015
1 parent c44dc71 commit 7ea2af3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions json_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func (h *JSONHandler) UnmarshalJSON(data []byte) error {
}
h.Level, _ = raw["level"].(string)
h.Message, _ = raw["msg"].(string)
delete(raw, "time")
delete(raw, "level")
delete(raw, "msg")

if h.Fields == nil {
h.Fields = make(map[string]string)
Expand Down Expand Up @@ -132,10 +135,6 @@ func (h *JSONHandler) Prettify(skipUnchanged bool) []byte {
return h.buf.Bytes()
}

func (h *JSONHandler) setField(key, val string) {

}

func (h *JSONHandler) joinKVs(skipUnchanged bool, sep string) []string {

kv := make([]string, 0, len(h.Fields))
Expand Down

0 comments on commit 7ea2af3

Please sign in to comment.