nolar / kopf

A Python framework to write Kubernetes operators in just a few lines of code
https://kopf.readthedocs.io/
MIT License
2.15k stars 163 forks source link

Logging: overriding the log formatter #1026

Open portswigger-tim opened 1 year ago

portswigger-tim commented 1 year ago

Keywords

logger formatting

Problem

I'd like to make use of the logfmt logging, er, format. Is there any way to override the logger formatter? I'm willing to open a PR to add either:

  1. a LOGFMT format
  2. the ability to pass in a custom log formatter class via OperatorSettings, similar to overriding posting levels

Any ideas or opinions on this would be appreciated :)

le-duane commented 12 months ago

@portswigger-tim did you have any luck with this?