mirror of https://github.com/sirupsen/logrus.git
Update papertrail.go
Report all log data, not just the entry.message.
This commit is contained in:
parent
51fe59aca1
commit
60d80a6d2c
|
@ -30,7 +30,8 @@ func NewPapertrailHook(host string, port int, appName string) (*PapertrailHook,
|
||||||
// Fire is called when a log event is fired.
|
// Fire is called when a log event is fired.
|
||||||
func (hook *PapertrailHook) Fire(entry *logrus.Entry) error {
|
func (hook *PapertrailHook) Fire(entry *logrus.Entry) error {
|
||||||
date := time.Now().Format(format)
|
date := time.Now().Format(format)
|
||||||
payload := fmt.Sprintf("<22> %s %s: [%s] %s", date, hook.AppName, entry.Level, entry.Message)
|
msg, _ := entry.String()
|
||||||
|
payload := fmt.Sprintf("<22> %s %s: %s", date, hook.AppName, msg)
|
||||||
|
|
||||||
bytesWritten, err := hook.UDPConn.Write([]byte(payload))
|
bytesWritten, err := hook.UDPConn.Write([]byte(payload))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue