Closed xenking closed 2 years ago
Thanks for figure out, after initial investigation, I think it's a design bug(or miss usage?)
The workaround is that dont use async writer as a underlying writer, it should use as a top writer.
I know this suggestion/limitation is not very make sense, so I call it may be "design bug", I'm considering a better way to implement async writer
I afraid that this fix will not 0-allocs for aysnc writer common cases, e.g. https://github.com/phuslu/log#asyncwriter
Description: Got panic when trying to print messages on Logger with MultiWriter: AsyncWriter in ErrorWriter, InfoWriter, WarnWriter struct fields, and ConsoleWriter. Reproduction example: https://play.golang.org/p/gkNrfO2M0Jv