Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

add global debug switch and GardenctlDebugLog / GardenctlInfoLog function #262

Merged

Conversation

neo-liang-sap
Copy link
Contributor

What this PR does / why we need it:
This PR adds

  • global switch -d or --debug to enable debug logging
  • two functions which could be utilized in whole gardenctl project, GardenctlDebugLog to output debug msg only when debug switch enabled, GardenctlInfoLog to display msg all the time

Which issue(s) this PR fixes:
Fixes #259

Special notes for your reviewer:

Release note:

global switch `-d` or `--debug` to enable debug logging, two functions which could be utilized in whole gardenctl project, `GardenctlDebugLog` to output debug msg only when debug switch enabled, `GardenctlInfoLog` to display msg all the time

@neo-liang-sap neo-liang-sap requested a review from a team as a code owner August 18, 2020 01:13
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 18, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 18, 2020
@neo-liang-sap
Copy link
Contributor Author

/CC @dansible

in flags, -d and --debug are added for enabling debug switch globally
image

in source code, if you want to add some log only shows when debug switch enabled, use GardenctlDebugLog, if you want to show msg all the time, use GardenctlInfoLog

@neo-liang-sap neo-liang-sap merged commit 686dbdf into gardener-attic:master Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an option for Gardenctl to enable global log level
3 participants