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

Introducing log levels in vipgoci_log() #329

Open
gudmdharalds opened this issue Nov 14, 2022 · 0 comments
Open

Introducing log levels in vipgoci_log() #329

gudmdharalds opened this issue Nov 14, 2022 · 0 comments

Comments

@gudmdharalds
Copy link
Contributor

gudmdharalds commented Nov 14, 2022

Feature request

With higher complexity of vip-go-ci and use cases as a library, too much information is logged in some cases, while in others it is optimal, and so a threshold needs to be configurable at run-time. See example of this here.

To resolve this, each log message should an associated log level. The levels would be: INFO, DEBUG and ERROR. ERROR would always be printed, but whether to print INFO and DEBUG messages would be configurable on the command line. This means that different use cases can make use of different log levels:

  • vip-go-ci in production would print INFO and ERROR log messages. This is based on prior experience, were having access to rich information is beneficial.
    • While in development, it would print INFO, DEBUG and ERROR.
  • The vip-go-compatibility-scanner would only print ERROR when fully configured to scan repositories.
    • While being tested, one could use INFO and ERROR.

Background of feature request

Logging has become too noisy in some use-cases, while in others it is fine. We need to be able to configure log levels easily.

Description of feature

vipgoci_log() needs to be altered, replacing the $debug_level parameter with $log_level which uses predefined constants. All calls to vipgoci_log() will need to be updated.

Supersedes #193.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant