Add optional formatter to writer hook#1184
Conversation
|
Thanks for your contribution. It is interesting indeed. Can you improve the documentation a bit on the hook.Writer class on how to use the new field and what is the expected behaviour when it is not defined ? |
|
@dgsb Added a line about Formatter usage. Hope it helps. |
|
When can we expect this to be merged? |
|
Here's the difference between 'DisableColors' false/true. Why is there such a total change in the formatting? Expected when DisableColors: false |
|
Seems this is an issue with the formatter itself and not this PR. Line 201 in d131c24 I'll open a different issue |
|
Thanks for your contribution @sivachandran |
|
Anything holding this up? Works great for me. |
|
@someburner What's holding this up is that logrus is, unfortunately, a dead project. It says in the README that new features won't be added. You'll have to do like me and run your own fork. |
The changes make
hooks.Writerto accept optionalFormatterwhich would be used to format the log entries before writing.