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
Consider a log that write to both stdout and file, we need a handler that write to both, the idea is similar to io.MultiWriter
The reason we can't use io.MultiWriter directly is we also want different format for different output. i.e. stdout, I want to use a human readable format, for file I want to use machine readable format, further more I can even log to multiple files with different format, i.e. log.txt and log.json
Consider a log that write to both stdout and file, we need a handler that write to both, the idea is similar to io.MultiWriter
The reason we can't use
io.MultiWriter
directly is we also want different format for different output. i.e. stdout, I want to use a human readable format, for file I want to use machine readable format, further more I can even log to multiple files with different format, i.e. log.txt and log.jsonRef
MultiHandler
The text was updated successfully, but these errors were encountered: