Skip to content
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

Generate Log FIle #916

Open
MaxCWhitehead opened this issue Feb 24, 2024 · 3 comments
Open

Generate Log FIle #916

MaxCWhitehead opened this issue Feb 24, 2024 · 3 comments
Assignees

Comments

@MaxCWhitehead
Copy link
Collaborator

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

@zicklag
Copy link
Member

zicklag commented Feb 25, 2024

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?

@nelson137
Copy link
Contributor

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

@MaxCWhitehead
Copy link
Collaborator Author

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 MaxCWhitehead self-assigned this Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants