You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writer and Handler seem to have a lot of overlapping responsibilities. In fact, they both have an example code in documentation that do the exactly same thing that write logs to Graylog.
The Writer is an underlying interface, which just accepts the content bytes and outputs to the destination you can customize.
The Handler is a more higher level callback function in which you can customize the logging content, color, prefix, etc. It is more flexable and extensible than Writer.
What do you want to ask?
Writer
andHandler
seem to have a lot of overlapping responsibilities. In fact, they both have an example code in documentation that do the exactly same thing that write logs toGraylog
.So, why there are two method to do the same work? What's the difference? Which is the recommended one?
The text was updated successfully, but these errors were encountered: