polds / logrus-papertrail-hook

Papertrail hook for Logrus - https://github.com/sirupsen/logrus
MIT License
12 stars 8 forks source link

Fix example of proper initialization of struct #2

Closed tonglil closed 8 years ago

tonglil commented 8 years ago

Need to use named literals since there are non-exported fields in the struct.

Ref: http://blog.tquadrado.com/2014/go-struct-initialization-with-named-literals/

polds commented 8 years ago

Thank you, for the update. I had written the README example before there were unexported fields in the struct.

tonglil commented 8 years ago

No problem, it works great (including without creating a new instance of the logger)! Thank you.