Open anishakj opened 3 years ago
@anishakj I noticed this when trying to cut down my logging bills for Azure AKS.
Example log message
{"level":"info","ts":1660655236.650773,"logger":"controller_zookeepercluster","msg":"Updating StatefulSet","Request.Namespace":"default","Request.Name":"iati-prod-solrcloud-zookeeper","StatefulSet.Namespace":"default","StatefulSet.Name":"iati-prod-solrcloud-zookeeper"}
For example, I see around 1370/hr of "Updating Statefulset"
❯ k logs --since=1h solr-operator-zookeeper-operator-89db79877-rg47x | grep "Updating StatefulSet" | wc -l
1371
Or looking at "level": "info"
, more than 9k/hr
❯ k logs --since=1h solr-operator-zookeeper-operator-89db79877-rg47x | grep 'level":"info' | wc -l
9195
Would definitely appreciate a way to turn off the info logs, or reduce their frequency.
Thanks!
Note I believe upgrading to v0.2.4 which includes the fix for https://github.com/pravega/zookeeper-operator/issues/389 has reduced this greatly.
❯ k logs --since=1h solr-operator-zookeeper-operator-58cf9b8bb7-tq9sw | grep 'level":"info' | wc -l
960
Description
Reevaluate Log Level for Operator
Importance
Nice_to_have
Location
main.go , zookeepercluster_controller.go
Suggestions for an improvement
Use Zerolog to set log level for operator code and set various log levels
How to verify it
Deploy operator and zookeeper cluster with various log levels set and check if corresponding logs are displayed or not.