Skip to content

Commit

Permalink
add lenient parsing of keys to logrus_handler
Browse files Browse the repository at this point in the history
  • Loading branch information
aybabtme committed Jun 16, 2017
1 parent d83d791 commit f818c75
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions logrus_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,16 @@ func (h *LogrusHandler) visit(key, val []byte) bool {
switch {
case bytes.Equal(key, []byte("level")):
h.setLevel(val)
case bytes.Equal(key, []byte("lvl")):
h.setLevel(val)
case bytes.Equal(key, []byte("msg")):
h.setMessage(val)
case bytes.Equal(key, []byte("message")):
h.setMessage(val)
case bytes.Equal(key, []byte("time")):
h.setTime(val)
case bytes.Equal(key, []byte("ts")):
h.setTime(val)
default:
h.setField(key, val)
}
Expand Down

0 comments on commit f818c75

Please sign in to comment.