Flone-dnb / FBugReporter

Easily add feedback and/or bug reporting functionality to your Godot game.
MIT License
63 stars 4 forks source link

Use a logging crate #5

Open LoipesMas opened 2 years ago

LoipesMas commented 2 years ago

I'd suggest using a logging crate, to reduce boilerplate code. Preferably one that uses log facade, such as env_logger or flexi_logger. I know flexi_logger can be customized a lot (formatting, where to write, mirroring to file and stdout), but other crates probably also have such functionalities.

This would also handle logs from libraries that are logging using log crate, which currently are being ignored (if there are such crates in your dependencies).

Flone-dnb commented 2 years ago

Good suggestion. We indeed have some redundant code for logging.

Flone-dnb commented 2 years ago

Better yet, we should develop a general logger struct that allows setting how much log files to keep (see server's logger) and make this new general logger reside in shared crate so that every part of the project will just use it.