oxy icon indicating copy to clipboard operation
oxy copied to clipboard

Allow disabling logrus

Open klingtnet opened this issue 8 years ago • 3 comments

First up, thanks for writing oxy! It's neat and helped us quite a bit so far.

However, we need the ability to disable logging from oxy, because we want to decide what to log ourselves.

To that end, we have a tiny fork that has a new github.com/vulcand/oxy/log package, which exposes only the parts of logrus' API that oxy uses, and delegates it to a package-internal *logrus.Logger. All imports of logrus have been changed to import the new package. In addition, it's now possible to .Disable() the logger, which sets the output to io.Discard.

Would you be interested in merging these changes? If not, would you be interested in merging changes that allow swapping out the logger?

And to the wider community: Do you also need to disable (or even change) the logger that oxy uses? If so, say so by :+1_tone3:ing this issue.

klingtnet avatar Jul 06 '17 11:07 klingtnet

Not being able to disable or reroute logging is really annoying.

AlexDunmow avatar Jul 19 '17 06:07 AlexDunmow

Would you be interested in merging these changes? If not, would you be interested in merging changes that allow swapping out the logger?

yes, go for it

klizhentas avatar Jul 19 '17 15:07 klizhentas

First up, thanks for writing oxy! It's neat and helped us quite a bit so far.

Glad it was helpful!

klizhentas avatar Jul 19 '17 15:07 klizhentas