Closed pieterhelsen closed 3 years ago
@ajacobson pinging you here as that might require some changes to Docker. We still need read-only access to the log file itself, but docker should be able to write a file in that same folder (can be temporary, not synced with host machine).
Edit: @pieterhelsen mentioned this file can be moved to chiadog folder. Maybe that'll be preferable for the docker setup?
Does this resolve https://github.com/martomi/chiadog/issues/72 🤔
@ajacobson pinging you here as that might require some changes to Docker. We still need read-only access to the log file itself, but docker should be able to write a file in that same folder (can be temporary, not synced with host machine).
Edit: @pieterhelsen mentioned this file can be moved to chiadog folder. Maybe that'll be preferable for the docker setup?
Added the manual offset to write to within the chiadog root directory. Don't think there's any downsides and might be easier for Docker.
Does this resolve #72 🤔
I sure hope so!
This closes #134
Split up the Windows and Linux/MacOS logic into separate consumers.
Added
pygtail
for Posix and Windows local consumers to enable better log rotation handling. Pygtail does add an artefact file (debug.log.offset
) to the.chia/mainnet/log/
folder. This could potentially be moved to the chiadog folder if that's preferable.Added
retry
to catch Pygtail errors and retryAdded
has_rotated
method for Windows Network consumer which reads log filesize over SSH using PowershellLog output will look similar to this:
[2021-05-21 23:12:45] [ WARNING] --- [WinError 2] The system cannot find the file specified: 'C:\\Users\\PieterHelsen\\workspace\\debug.log', retrying in 2 seconds... (api.py:40)