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

rework logging/output #158

Closed
1 task
jkowalleck opened this issue Sep 24, 2022 · 1 comment · Fixed by #1131 · May be fixed by #1129
Closed
1 task

rework logging/output #158

jkowalleck opened this issue Sep 24, 2022 · 1 comment · Fixed by #1131 · May be fixed by #1129
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jkowalleck
Copy link
Member

current console output is done via writig to stdout in a custom console.
maybe better use a dedicated debug/log libary? like https://www.npmjs.com/package/debug

motivation:

  • have different log levels: debug,info,warn,critical,error
  • have an CLI switch to set the desired output level - like --verbose 3 or -vvv

acc crit:

  • all log/debug must go to STDERR - so stdout is free returned SBOM data
@jkowalleck jkowalleck added the enhancement New feature or request label Sep 24, 2022
@jkowalleck jkowalleck added good first issue Good for newcomers help wanted Extra attention is needed labels Jun 16, 2023
@jkowalleck
Copy link
Member Author

idea:

  • use a logger, instead of printing directly to STDERR.
  • logger would have a configurable level, default to 'warning'.
  • logger would print to STDERR.
  • logger level can be increased via CLI switch --verbose ... -v|-vv|-vvv

jkowalleck added a commit that referenced this issue Dec 8, 2023
## Changed
  * Log output is less verbose, can be re-enabled via CLI switch `--verbose`  
    Warnings and errors are still displayed as before.  
    This is considered a non-breaking change, since only informational logs and debug information is affected.
## Added
  * CLI switch `-v, --verbose` to increase output verbosity
    May be used multiple times, like `-vvv`.
  * More logs on info-level 
  * More logs on debug-level

fixes #158

---------

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
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
1 participant