-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Limit the size of the logfile #735
Comments
Some alternative solutions may be to:
|
By the way, is this on master or |
There's some discussion on the issue of log size in #566. Raising the log level to warn or error by default would also keep the size in check. |
it's on |
also perhaps not truncate the error (in terms of line size limit)? if it was a little longer, more information could be gathered I think. |
There's no truncation happening, the error is just empty. If the LSP died we did not properly detect EOF and just kept reading 0 bytes and erroring. It's fixed on master 41f1e8e
We actually do that already Line 12 in 0b1bc56
|
Ah my log file was 20,000 lines long and there were
Then I think this issue can be closed ? |
I'll re-open if this happens again with master. |
Unfortunately, I just ran out of space on my device from a 17Gb log file. I deleted it before I read it to check the contents, so I'll make sure to do that next time, but I have only been using Helix for a week or so. Having a limit on the length seems pretty valuable. |
I'm not sure if |
Yep, it was |
That specific bug was already fixed in master.
|
I installed from pacman, so I'll just compile from source this time. |
Though this shouldn't be an issue for me, it still seems that having a non-truncating log file could be problematic here. |
It wouldn't be something that drastic if we do custom roll something. |
Probably we need to custom roll one ourselves, probably can use tracing-subscriber and write a custom |
Before we go overboard with the implementation, all we need to do is use https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.truncate |
|
It's not quite the same since it will completely wipe the log if you were to open helix again. This means that it doesn't prevent you from racking up a 17gb log in one session (though I guess it's only a problem if there was a bug like before). It's probably a good enough solution though. |
Describe your feature request
I left the editor overnight somehow, I woke up to a 4GB logfile.
It seems something went wrong, but the logfile is filled with
2021-09-09T10:20:04.104 helix_lsp::transport [ERROR] err <-
the lines are truncated, so unfortunately I can't say much more.
How about limiting the size of the log file to 128 mb ? (just in case it gets out of control)
The text was updated successfully, but these errors were encountered: