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
I did logging for my Krecik app as you may know already… but I also did a second application to watch log changes using kquque: https://github.com/VerKnowSys/lw
Thing is… I test it on my ZFS-on-root FreeBSD system, where Krecik logs to /var/log/krecik/krecik.log-2021-02-18 files. And it does a great job, BUT! There's no event about file modification sent from those files at all.
I wonder - if that's about doing sync() rarely or sth like that? Is there a way to let's say… tell fern to sync to disk manually somehow? Any ideas what can cause kqueue events not be sent from files written by fern logger? :)
The text was updated successfully, but these errors were encountered:
I wonder - if that's about doing sync() rarely or sth like that? Is there a way to let's say… tell fern to sync to disk manually somehow? Any ideas what can cause kqueue events not be sent from files written by fern logger? :)
As it happens, yeah - I don't think fern will ever trigger sync manually right now. I think adding configuration for this could definitely be a good idea - flushing / syncing every x logs or x bytes could help ensure lack of data loss.
I'd thought you could trigger this manually with log::logger().flush(), but I think even that might not actually do it? Fern implements flushing for files by calling std::io::Write::flush, which appears to be implemented separately from File::fsync - and on Unix systems, at least, is a no-op. Flushing will ensure we write all data from our internal buffer to the file, so it isn't totally useless, but it doesn't fsync. Fixing this so flush performs an fsync, or at least something can trigger an fsync, seems like a good idea.
I did logging for my Krecik app as you may know already… but I also did a second application to watch log changes using kquque: https://github.com/VerKnowSys/lw
Thing is… I test it on my ZFS-on-root FreeBSD system, where Krecik logs to /var/log/krecik/krecik.log-2021-02-18 files. And it does a great job, BUT! There's no event about file modification sent from those files at all.
I wonder - if that's about doing sync() rarely or sth like that? Is there a way to let's say… tell fern to sync to disk manually somehow? Any ideas what can cause kqueue events not be sent from files written by fern logger? :)
The text was updated successfully, but these errors were encountered: