gemnasium / logrus-graylog-hook

Graylog hook for logrus
MIT License
87 stars 63 forks source link

Sometimes logs are not sent to graylog #54

Closed joe-hb closed 3 years ago

joe-hb commented 3 years ago

I'm initializing the Graylog-Hook like this:

hook := graylog.NewGraylogHook(graylogAddr, map[string]interface{}{"project": project, "APP_ENV": appEnv}) logrus.AddHook(hook)

and sent a message directly afterwards:

logrus.WithFields(logrus.Fields{"uuid": startUpID, "event": "startUp"}).Infof("Log messages are now sent to Graylog (udp://%s)", graylogAddr)

in roughly 30% of program starts, no logs at all are published to graylog. Console prints the log lines just fine (did not set NullFormater). I also tried the Async Hook, but no difference. Either it just works after program start, or not at all. Any idea what this might be caused by? We're using Graylog 3.3.2+ade4779.

I can provide more information if needed.

joe-hb commented 3 years ago

seems this is solved in 3.3.5, so it might have been a problem with graylog