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

Use a logging crate #5

Open
LoipesMas opened this issue Jul 24, 2022 · 2 comments
Open

Use a logging crate #5

LoipesMas opened this issue Jul 24, 2022 · 2 comments
Labels
difficulty: easy Good for newcomers enhancement New feature or request
Milestone

Comments

@LoipesMas
Copy link
Contributor

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 Flone-dnb added the enhancement New feature or request label Jul 24, 2022
@Flone-dnb
Copy link
Owner

Flone-dnb commented Jul 24, 2022

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

@Flone-dnb
Copy link
Owner

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.

@Flone-dnb Flone-dnb added the difficulty: easy Good for newcomers label Aug 2, 2022
@Flone-dnb Flone-dnb added this to the v1.2.0 milestone Aug 2, 2022
@Flone-dnb Flone-dnb modified the milestones: v1.2.0, v1.3.0 May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy Good for newcomers enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants