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

replace klog with zap log. #268

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

morvencao
Copy link
Contributor

@morvencao morvencao commented Feb 27, 2025

ref: https://issues.redhat.com/browse/ACM-17785

This PR replaces klog with zap logger. The log levels are:

  • DebugLevel: Detailed debugging.
  • InfoLevel: General info.
  • WarnLevel: Warnings.
  • ErrorLevel: Errors that don’t stop the program.
  • DPanicLevel: Serious issues causing a panic when synced.
  • PanicLevel: Immediate panic.
  • FatalLevel: Critical errors that stop the app.

It also allows changing the log level at runtime via a ConfigMap in the maestro namespace:

# oc -n maestro get cm maestro-logging-config -o yaml
apiVersion: v1
data:
  config.yaml: |
    log_level: debug
kind: ConfigMap
metadata:
  name: maestro-logging-config
  namespace: maestro

This allows changing the log level without restarting the maestro pod.

@morvencao
Copy link
Contributor Author

/assign @clyang82

Signed-off-by: morvencao <lcao@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant