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

Set LOG_LEVEL not work #114

Open
celiawa opened this issue May 5, 2023 · 4 comments · May be fixed by #125
Open

Set LOG_LEVEL not work #114

celiawa opened this issue May 5, 2023 · 4 comments · May be fixed by #125
Labels
bug Something isn't working

Comments

@celiawa
Copy link

celiawa commented May 5, 2023

Is this a bug report or feature request?

  • Bug Report

Describe the bug
Couldn't change the log level via LOG_LEVEL env.

Seems the code in this line, missing envconfig:"LOG_LEVEL", so it couldn't get the config value.

How to Reproduce
Steps to reproduce the behavior:

  1. Set LOG_LEVEL to ERROR or DEBUG via "kubectl -n istio-system edit cm oidc-authservice-parameters".

  2. Confirm the env in the authservice-0 pod.
    ~ $ env |grep LOG LOG_LEVEL=ERROR

  3. Still the info level log printed.

Expected behavior
The log level changed accordingly.

Environment:

  • AuthService version: e236439
  • Platform: rke
  • Kubernetes version: v1.24.10
@celiawa celiawa added the bug Something isn't working label May 5, 2023
@Sayed-Imran
Copy link

Any update on this issue ? Even I am also facing issue.

@celiawa
Copy link
Author

celiawa commented Jun 19, 2023

@Sayed-Imran, I think no update. I built a private build with the code change for my test.

@Sayed-Imran
Copy link

What all steps did you perform in order to get the desired @celiawa ?

@celiawa
Copy link
Author

celiawa commented Jun 21, 2023

I just clone the code and changed this line in common/settings.go
LogLevel string split_words:"true" default:"INFO"
to
LogLevel string split_words:"true" default:"INFO" envconfig:"LOG_LEVEL"

And run "docker build -t oidc-authservice:v1 ." to build the private docker image, and deploy with the private image.

alekc added a commit to alekc/oidc-authservice that referenced this issue Apr 12, 2024
@alekc alekc linked a pull request Apr 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants