gemnasium / logrus-graylog-hook

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

Why not a optional facility? #15

Closed bernardolm closed 7 years ago

bernardolm commented 7 years ago

Hi, firstly thanks for graylog hook and sorry by my poor english!

I was used to log to graylog using this lib to a shared graylog server that has a innumerous streams, differentiated by facilities.

When you removed facility arg for method NewGraylogHook (because this is deprecated but optional for GELF) and create a new release version, I kept in v1 version by the facilities.

But now, the github.com/SocialCodeInc/go-gelf/gelf is broken and you fix it in v2 but v1 is yet broken.

I understand when you cut off facility from method contract but why not do a optional arg (using pointer arg) or do something like a overload or a NewGraylogHookWithFacility anyway?

Thanks by your attention!

gravis commented 7 years ago

Hi, did you checkout the v2 of this library? https://github.com/gemnasium/logrus-graylog-hook/blob/master/CHANGELOG.md#200---2016-07-02 Facility is already optional, so I guess you're using the v1 instead of v2. Please reopen if needed.

bernardolm commented 7 years ago

Yes, yes, I saw @gravis. I saw the code and read changelog about v1 and v2. But I'm meant use optional in constructor anyway. If some coder uses v2, he needs to change a lot of lines of codes to use optionally facility in any call of log or do a proxy for that, in any way, will change a lot of code.