Closed nh2 closed 1 year ago
I found this while reading the code after some log lines are seemingly missing in my log files, for an application that uses
newFileLoggerSetN defaultBufSize (Just 1) fp
, which should lead to theSingleLogger
code path.
That said, the application on which I observed this uses fast-logger-3.0.5
, which does not have the SingleLogger
module at all yet.
You are right. Could you send a PR to record your credit?
PR at #209
https://github.com/kazu-yamamoto/logger/blob/e04ea1787b887c5b96d9ad0f718115854d0d7efe/fast-logger/System/Log/FastLogger/LoggerSet.hs#L161-L171
The docs say "
Flushing the buffers
".For
MultiLogger
that happens here:https://github.com/kazu-yamamoto/logger/blob/e04ea1787b887c5b96d9ad0f718115854d0d7efe/fast-logger/System/Log/FastLogger/MultiLogger.hs#L107-L110
But for
SingleLogger
the call toflushAllLog
is missing:https://github.com/kazu-yamamoto/logger/blob/e04ea1787b887c5b96d9ad0f718115854d0d7efe/fast-logger/System/Log/FastLogger/SingleLogger.hs#L102-L105
Should there be a
in here?
I found this while reading the code after some log lines are seemingly missing in my log files, for an application that uses
newFileLoggerSetN defaultBufSize (Just 1) fp
, which should lead to theSingleLogger
code path.