mirror of
https://github.com/mthenw/frontail.git
synced 2026-04-26 02:05:57 +03:00
[GH-ISSUE #197] Logs added to the file is not displayed on Windows #130
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/frontail#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @teid on GitHub (Mar 6, 2020).
Original GitHub issue: https://github.com/mthenw/frontail/issues/197
Hi :)
First I wanted to thank you for this project. I've used it on Linux and it's a great tool !
Recently, I tried to use it on Windows Server 2016 with a Java application and log4j.
When the application adds some lines in the log file, I don't see the update in frontail.
Even if I reload the browser.
But, when I open the log file on the server with another program like Notepad++, the logs are instantly loaded in frontail.
This looks like the behavior described here:
https://docs.microsoft.com/en-us/archive/blogs/asiasupp/file-date-modified-property-are-not-updating-while-modifying-a-file-without-closing-it
They suggest to open and close a handle on the log file.
Would you accept to do this in frontail ?
Regards,
Timothée
@teid commented on GitHub (Mar 11, 2020):
I modified frontail to use node-tail instead of fs-tail-stream
I changed the file
lib/tail.js(it's a rough implementation, I did not take the time to report every features like stdin, initial number of lines and native tail):It's the option
useWatchFile: trueof the lib node-tail that made it work on Windows@mthenw commented on GitHub (Mar 14, 2020):
Hey,
Can you create a PR for that?
@teid commented on GitHub (Mar 15, 2020):
Sure I can do that.
When
useWatchFileis set to true, fs.watchFile will be used instead of fs.watchfs.watchFileis less efficient thatfs.watch, maybe we can enable it only on Windows ? Or do you want it to be an option ?@mthenw commented on GitHub (Mar 16, 2020):
I think it makes sense to enable that only on windows