Skip to content

can't configure logging level for kubernetes observer #19020

@stephane-additive

Description

@stephane-additive

Bug summary

We have some issues with our prefect worker's kubernetes observer, and we're trying to narrow down where the issue comes from. In order to do that, we'd like to enable debug logging for all the logs in observer.py, but it looks like it's being hardcoded to logging.INFO in that same file, instead of being left to logging.yml.

Is there any chance we could move the logger configuration back to logging.yml, and remove all python-forced level setting?

Version info

Version:             3.4.13
API version:         0.8.4
Python version:      3.12.11
Git commit:          2b0ea9be
Built:               Thu, Aug 14, 2025 09:09 PM
OS/Arch:             linux/x86_64
Profile:             ephemeral
Server type:         server
Pydantic version:    2.11.7
Integrations:
  prefect-docker:    0.6.3
  prefect-gcp:       0.6.6
  prefect-kubernetes: 0.6.1
  prefect-redis:     0.2.4

Additional context

The problematic code line is at

logging.getLogger("kopf.objects").setLevel(logging.INFO)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions