Open MaxCWhitehead opened 7 months ago
Excellent idea. Maybe we should retain like the logs for the last 10 runs of the game or something, just to keep the log from growing infinitely.
Maybe it's logged to stderr instead of stdout and that's why piping wasn't working?
Maybe it's logged to stderr instead of stdout and that's why piping wasn't working?
Yep, you can do this to pipe the logs:
./target/debug/jumpy 2>jumpy.log
To confirm last discussion - redirecting both stdout/stderr with &>
does seem to work.
Going to work on logging to appropriate directory for platform and rotating log files.
Description
We should save game logs to disk (and still send to stdout). This will be useful for gathering information if playtesters run into issues.
It also seems like piping stdout when running game from cli doesn't actually work. Possibly due to game being in a subprocess or something related to bevy? Needs investigation.
Alternatives & Prior Art
No response