-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tailing on non (unusual) flushing loggers #334
Comments
Thanks! That sounds very interesting, I will test this and make it part of debugview++ |
NFlog4cxx64.zip |
I tried your test and see exactly what you mean, very interesting. |
tail for win32 and notepad++ seems to have solved this the same way you suggest. |
I tested your proposal, however it does not work, fs::file_size(p); is not triggering the FILE_NOTIFY_CHANGE_SIZE... I do see that right-clicking the log-file or clicking 'properties' in explorer does trigger FILE_NOTIFY_CHANGE_SIZE... looking for better ways... |
please try this pre-release version |
Sorry ,your are right ; I also did |
I testeted v1.8.0.27 👍 |
good to hear. however, I'm not really keen on the current solution, its polling the filesize every 500ms, which means it is doing more work then should be needed and the timestamps (in debugview) are at best 500ms-accurate, which is quite bad compared to the normal ~microsecond accuracy. |
this is taken over from #331
I use log4cxx as a logging framework. It turns out that flushing do not operate as expected.
When tailing the file in DebugView++ the FILE_NOTIFY_CHANGE_SIZE event will never be invoked. It will be invoked if you hit F5 in file explorer or if you start Baretail.exe (https://www.baremetalsoft.com/baretail/) alongside to tail the same file.
I also made a test app with log4cxx and I try to forced to do an immediate flush by using the approbiate API function (appender->setImmediateFlush(true); for the record), but the behaviour
do not change. So it is supposed to be a bug in log4cxx or they forget to remove API function, because the never want to flush...
So I came along with a workaround, because I noticed by quering the filesize periodically invokes the FILE_NOTIFY_CHANGE_SIZE in DebugView++.
So if you add in FileReader ctor the following ( just to sketch the idea roughly..) :
it turns out tailing/autoscroll operation works again.
The text was updated successfully, but these errors were encountered: