fishfolk / jumpy

Tactical 2D shooter in fishy pixels style. Made with Rust-lang 🦀 and Bevy 🪶
https://fishfolk.org/games/jumpy/
Other
1.64k stars 118 forks source link

Hide the Annoying Sound Parsing Logs From the Jumpy Log Output #873

Open zicklag opened 9 months ago

zicklag commented 9 months ago

Description

Currently we are getting some annoying log messages in the Jumpy console that take up a lot of space and make it harder to find/notice important log messages from things like the asset system:

...
2023-12-03T20:07:34.259686Z  INFO log: found the format marker [4f, 67, 67, 53] @ 0+2 bytes.
2023-12-03T20:07:34.259710Z  INFO log: starting new physical stream
2023-12-03T20:07:34.259716Z  INFO log: selected vorbis mapper for stream with serial=0x700200e7
2023-12-03T20:07:34.260120Z  INFO log: found the format marker [4f, 67, 67, 53] @ 0+2 bytes.
2023-12-03T20:07:34.260142Z  INFO log: starting new physical stream
2023-12-03T20:07:34.260149Z  INFO log: selected vorbis mapper for stream with serial=0x25114fc9
2023-12-03T20:07:34.282013Z  INFO log: found the format marker [4f, 67, 67, 53] @ 0+2 bytes.
2023-12-03T20:07:34.282047Z  INFO log: found the format marker [4f, 67, 67, 53] @ 0+2 bytes.
2023-12-03T20:07:34.282051Z  INFO log: starting new physical stream
2023-12-03T20:07:34.282059Z  INFO log: selected vorbis mapper for stream with serial=0x6809edb0
2023-12-03T20:07:34.282088Z  INFO log: starting new physical stream
2023-12-03T20:07:34.282093Z  INFO log: selected vorbis mapper for stream with serial=0x1845da35
2023-12-03T20:07:34.282012Z  INFO log: found the format marker [4f, 67, 67, 53] @ 0+2 bytes.
2023-12-03T20:07:34.282017Z  INFO log: found the format marker [4f, 67, 67, 53] @ 0+2 bytes.
2023-12-03T20:07:34.282279Z  INFO log: starting new physical stream
2023-12-03T20:07:34.282287Z  INFO log: selected vorbis mapper for stream with serial=0x7b29a095
2023-12-03T20:07:34.282387Z  INFO log: starting new physical stream
2023-12-03T20:07:34.282453Z  INFO log: selected vorbis mapper for stream with serial=0x138d2822
2023-12-03T20:07:34.286718Z  INFO log: found the format marker [4f, 67, 67, 53] @ 0+2 bytes.
...

We should make sure the log filter is set to ignore these messages by default.

Alternatives & Prior Art

No response

orhun commented 9 months ago

Related: https://github.com/pdeljanov/Symphonia/issues/142

I'd like to take a stab at this but I don't know how the logging is initialized. Can you give me some pointers?

zicklag commented 9 months ago

Thanks, that'd be a great help!

The logger is initialized when we install the Bevy default plugins, which contains the LogPlugin. That's actually in bones here, so this is probably technically a bones issue.

When testing in Bones, you can run the features demo to try it out.

orhun commented 9 months ago

Created a PR at https://github.com/fishfolk/bones/pull/273

Please note that I couldn't make jumpy work with the latest main of bones so I checked out a0e378443c565da47bfdc29539bff8ac0bd3183c and tested there.