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

feat(logging): abstract logging methods to macros #216

Closed
Jon-Becker opened this issue Dec 2, 2023 · 1 comment
Closed

feat(logging): abstract logging methods to macros #216

Jon-Becker opened this issue Dec 2, 2023 · 1 comment
Assignees
Labels
D-easy Difficulty: easy P-normal Priority: normal T-perf Type: performance

Comments

@Jon-Becker
Copy link
Owner

Component

Other (please specify)

Describe the feature you would like

Instead of instantiating new Loggers in each method and passing references around, allLogger methods should be converted to macros that:

  1. get verbosity from the RUST_LOG environment variable (this is set by heimdall-cli, so it's accurate)
  2. check if verbosity is greater minimum verbosity for that log. (error >= 0, warn >= 1, info >= 2, etc.)
    a. if it is, send the log
    b. if not, return!

Ex: https://github.com/Jon-Becker/heimdall-rs/blob/main/common/src/utils/io/macros.rs
Then, the PR should delete all instances of Logger. Trace TraceFactory still make sense in their current implementations, so these structs should be preserved.

@Jon-Becker Jon-Becker added D-easy Difficulty: easy P-normal Priority: normal T-perf Type: performance good first issue Good for new contributors labels Dec 2, 2023
@iankressin
Copy link
Contributor

iankressin commented Dec 21, 2023

I'll take this one 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-easy Difficulty: easy P-normal Priority: normal T-perf Type: performance
Projects
None yet
Development

No branches or pull requests

2 participants