Replies: 6 comments
-
Well, we went full circle on this. There was a bug that made us log continually every second when the LSP crashed. Which lead us to truncate the file each time. But then trying to open the logfile (or opening multiple helix instances) would wipe the file before you could read it. |
Beta Was this translation helpful? Give feedback.
-
Which is why IMO it should write to stderr by default, or the specified file, and only when run with |
Beta Was this translation helpful? Give feedback.
-
Logging only critical errors is helpful in the case of a crash though. Especially when we get bug reports from stripped builds that don't have a proper backtrace. |
Beta Was this translation helpful? Give feedback.
-
In that case, I think a good first step would be to write to stderr by default (and continue logging even without |
Beta Was this translation helpful? Give feedback.
-
Maybe we could warn the user in Helix if their log is huge. Or maybe that's just lazy, idk. |
Beta Was this translation helpful? Give feedback.
-
I looked into logging to However, as part of reviewing this ticket, I've opened a fix for the open-log command |
Beta Was this translation helpful? Give feedback.
-
Describe your feature request
The log file should be truncated, and should only be written to when using one of the verbosity flags. I can see, some day in the (distant?) future, where some user writes a post about how their helix log file was taking up gigabytes of disk space because it's append-only and never cleaned up.
The verbosity flag should take a filename argument that will then be created (if it doesn't exist) or truncated (if it does) and begin writing its logging information to it.
Beta Was this translation helpful? Give feedback.
All reactions