packageeventlogimport("encoding/json""fmt""github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/maybebtc/logrus")typePoliteJSONFormatterstruct{}func(f*PoliteJSONFormatter)Format(entry*logrus.Entry)([]byte,error){serialized,err:=json.Marshal(entry.Data)iferr!=nil{returnnil,fmt.Errorf("Failed to marshal fields to JSON, %v",err)}returnappend(serialized,'\n'),nil}