Skip to content

Unset the LOG_LEVEL variable#5249

Merged
ferrarimarco merged 1 commit intomainfrom
fix-checkov-log
Feb 9, 2024
Merged

Unset the LOG_LEVEL variable#5249
ferrarimarco merged 1 commit intomainfrom
fix-checkov-log

Conversation

@ferrarimarco
Copy link
Copy Markdown
Collaborator

Proposed changes

  • Super-linter uses the LOG_LEVEL variable to let the user configure the desired log level. Checkov and Renovate use a variable with the same name for the same purpose, but accept a different set of values, and exit with an error if it gets an unknown value for that variable.
  • Refactor the VERBOSE log level to the more commonly used INFO. Configuration validation will warn users if they use VERBOSE and instruct them to use INFO instead. This is not a breaking change because super-linter falls back on INFO if VERBOSE is set.
  • Remove the TRACE log level because we rarely used it. As with VERBOSE, configuration validation will warn the user. Fall back to DEBUG if the user configured LOG_LEVEL to VERBOSE.

Close #5217

Readiness checklist

In order to have this pull request merged, complete the following tasks.

Pull request author tasks

  • I included all the needed documentation for this change.
  • I provided the necessary tests.
  • I squashed all the commits into a single commit.
  • I followed the Conventional Commit v1.0.0 spec.
  • I wrote the necessary upgrade instructions in the upgrade guide.
  • If this pull request is about and existing issue,
    I added the Fix #ISSUE_NUMBER label to the description of the pull request.

Super-linter maintainer tasks

  • Label as breaking if this change breaks compatibility with the previous released version.
  • Label as either: automation, bug, documentation, enhancement, infrastructure.

@ferrarimarco ferrarimarco added bug Something isn't working O: backlog 🤖 Backlog, stale ignores this label labels Feb 9, 2024
@ferrarimarco ferrarimarco self-assigned this Feb 9, 2024
@ferrarimarco
Copy link
Copy Markdown
Collaborator Author

(pushing a test that's expected to fail. I'll push the fix after that)

- Super-linter uses the LOG_LEVEL variable to let the user
  configure the desired log level. Checkov and Renovate use a variable
  with the same name for the same purpose, but accept a
  different set of values, and exit with an error if it gets an unknown
  value for that variable.
- Refactor the VERBOSE log level to the more commonly used INFO.
  Configuration validation will warn users if they use VERBOSE and
  instruct them to use INFO instead. This is not a breaking change
  because super-linter falls back on INFO if VERBOSE is set.
- Remove the TRACE log level because we rarely used it. As with VERBOSE,
  configuration validation will warn the user. Fall back to DEBUG if the
  user configured LOG_LEVEL to VERBOSE.

Close #5217
Copy link
Copy Markdown
Collaborator

@Hanse00 Hanse00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, though I'm curious if @zkoppert has any opinions on this.

Comment thread lib/functions/validation.sh
@ferrarimarco ferrarimarco added this pull request to the merge queue Feb 9, 2024
Merged via the queue into main with commit 83eca1d Feb 9, 2024
@ferrarimarco ferrarimarco deleted the fix-checkov-log branch February 9, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working O: backlog 🤖 Backlog, stale ignores this label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Super-linter LOG_LEVEL variable conflicts with Checkov and Renovate LOG_LEVEL

2 participants