mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
our dear friend mr. funclogger was bypassing calls to our multi writer since we were embedding a *bytes.Buffer, it was using ReadFrom and WriteString which would never call the stderr logger's Write method (or, as I learned, other things trying to wrap that buffer's Write method...). the tl;dr is many times DEBUG lines don't get spat out, from async tasks especially (few people using this). I think the final solution is probably to make funclogger a 'more robust' interface that we understand instead of trying to minimize it to an io.ReaderWriterCloser, much like how bytes.Buffer has all kinds of methods implemented on it, we can implement things like ReadFrom and WriteString most likely. not a big fan of how things are now (and it's my own doing) with the readerwritercloser coming from multiple places but meh, will get to it some day soon, the log stuff will be a pretty hot path.