Describe the bug:
Structured logging was addressed in https://github.com/jetstack/cert-manager/pull/1409 however there does not appear to be a command-line flag to select the log format, e.g. JSON. That, or it is not documented?
Expected behaviour:
Structured logging can be enabled in the pod spec.
Steps to reproduce the bug:
n/a
Anything else we need to know?:
Environment details::
v1.14.8-gke.330.13.0/kind bug
This is correct, it's not something we currently support. It'd be a great feature addition however 馃槃
/remove-kind bug
/kind feature
/help-wanted
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale
/remove-lifecycle stale
Is there any progress ? It would be super usefull to have structured logging output, for such a crucial infrastructure component like cert-manager.
Use case:
Tools like Splunk can autoindex json, there is no problem with stdout multiline splitting and its much more better/cleaner solution than unstructured random chunks of log.
Thanks
@lukasmrtvy we are looking into improving logs in the next release with a strong audit about our current logs and the log levels
@lukasmrtvy we are looking into improving logs in the next release with a strong audit about our current logs and the log levels
did log format include here too?
any progress?) can we help you to implement this feature?
This mostly depends on a lack of support for JSON in https://github.com/kubernetes/klog
If there is a way we can add this either upstream or with something pluggable into klog in our part of the code that would be welcome
@meyskens isnt it possible since https://github.com/kubernetes/klog/releases/tag/v2.0.0 ?
@lukasmrtvy i was reading something on k8s 1.19 and indeed... that should be possible now... i haven't tested it on cert-manager yet due it not being in the klog release notes i didn't notice it before
Seems we still need to do some tricks to support this, mainly those done in https://github.com/kubernetes/component-base/blob/master/logs/options.go
PRs are welcome for this :wink:
Most helpful comment
@lukasmrtvy we are looking into improving logs in the next release with a strong audit about our current logs and the log levels