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

Add logging #3

Open
orhun opened this issue May 18, 2024 · 2 comments
Open

Add logging #3

orhun opened this issue May 18, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@orhun
Copy link
Owner

orhun commented May 18, 2024

Is your feature request related to a problem? Please describe.

nvd_cve crate shows some logs regarding the fetched feeds but flawz do not use any logging.

Describe the solution you'd like

We can initialize logging via crates env_logger or tracing crates and log the following information at startup:

  • Database location (debug)
  • Fetched feeds (info)
  • Database URL
  • And so on.

Describe alternatives you've considered

None.

Additional context

Just for context, nvd_cve logs the feed info as follows:

image

@orhun orhun added the enhancement New feature or request label May 18, 2024
@orhun orhun self-assigned this May 18, 2024
@orhun orhun added help wanted Extra attention is needed good first issue Good for newcomers labels May 18, 2024
@orhun orhun removed their assignment May 18, 2024
@pcrock-thmdo
Copy link

In my case I'm encountering errors, but only for the 2020 and 2021 feeds:

❯ flawz --feeds 2020 --force-update
[Feed: 2020] Fetching feed (5.58 MB)              [-----------------------------]   0%
Error: CacheError(HttpError(IOError))
[Feed: 2020] Fetching feed (5.58 MB)              [=======----------------------]  25%

I'd certainly like to have some more information so I can figure out how to fix it.

@orhun
Copy link
Owner Author

orhun commented Jul 27, 2024

Those are coming from nvd_cve and we should probably add logging to that crate too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants