Closed fraozy closed 1 year ago
hey, Could you check if the operator receives these parameters?
- '--zap-log-level=info'
- '--zap-encoder=console'
- '--zap-time-encoding=rfc3339'
This is how it should look (ignoring that I'm using my own registry)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
We're observing the same behavior:
logging.operator.format
to json
keda-operator
resources have --zap-encoder=json
in the list of argsI noticed there's nothing in the kedakore/keda repo that seems to indicate the log format can be changed, other than the docs.
Hey, kedacode/keda doesn't say anything but you can find the available formats in helm values 😄
What do you mean as klog format? Do you mean the date? You can modify that format using the value logging.operator.timeEncoding
, the value rfc3339
or rfc3339nano
could match your requirements (default value is rfc3339
in chart atm).
Hi @JorTurFer - I'm saying that setting the logging.operator.format
doesn't do anything because it's hardcoded to console
in keda:
Am I missing something on how we can get the logging.operator.format
set to json
to take effect?
I can see that the chart overrides the command and uses provided values, so if you are using helm (I think so due to the parameter you sent), the value should be overwritten. Could you check if your deployment has those values?
I'm very sorry @JorTurFer - I was looking at logs from the keda-operator-metrics-apiserver
deployment. It seems that only has a level setting as opposed to the operator having level, format, and timeEncoding.
Our logs for keda-operator
are correctly being emitted as JSON 🤦
No worries at all, it happens. Happy to see that the issue is solved :)
I'm very sorry @JorTurFer - I was looking at logs from the
keda-operator-metrics-apiserver
deployment. It seems that only has a level setting as opposed to the operator having level, format, and timeEncoding.Our logs for
keda-operator
are correctly being emitted as JSON 🤦
That said, I'd like to have the metrics-apiserver log in json format as well, primarily because all info logs are emitted to stderr and those show up as error logs in our logging system. Could this functionality please be added?
Report
The keda-operator show logs with incorrect LEVEL TIME format. Example:
This is preventing the monitoring tool to correctly identify the error level at log message. The error was not happening at previous version used, KEDA version 2.5.0
Expected Behavior
The date/time should be in the correct format, like :
Actual Behavior
All the logs at keda-operator are been displayed with incorrect date/time.
Steps to Reproduce the Problem
Just check the logs from keda-operator
Logs from KEDA operator
KEDA Version
2.7.1
Kubernetes Version
1.22
Platform
Microsoft Azure
Scaler Details
Azure Service Bus
Anything else?
No response