jumpy icon indicating copy to clipboard operation
jumpy copied to clipboard

Generate Log FIle

Open MaxCWhitehead opened this issue 1 year ago • 3 comments

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

MaxCWhitehead avatar Feb 24 '24 04:02 MaxCWhitehead

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?

zicklag avatar Feb 25 '24 16:02 zicklag

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

nelson137 avatar Mar 23 '24 20:03 nelson137

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.

MaxCWhitehead avatar Aug 18 '24 20:08 MaxCWhitehead