Cert-manager: No flag to set structured logging output, e.g. JSON?

Created on 17 Feb 2020  路  10Comments  路  Source: jetstack/cert-manager

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::

  • Kubernetes version (e.g. v1.10.2): v1.14.8-gke.33
  • Cloud-provider/provisioner (e.g. GKE, kops AWS, etc): GKE
  • cert-manager version (e.g. v0.4.0): 0.13.0
  • Install method (e.g. helm or static manifests): Static manifest

/kind bug

help wanted kinfeature prioritbacklog

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

All 10 comments

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:

Was this page helpful?
0 / 5 - 0 ratings