Skip to content

Make logger configuration namespace-aware for clarity and specificity #11930

@anna-geller

Description

@anna-geller

Feature description

Currently, logger configuration in Kestra does not include the namespace as part of the key path. This can lead to ambiguity when flows or tasks share the same IDs across multiple namespaces.

Example:

logger:
  levels:
    task.hello-world.log: 'OFF'
    trigger.hello-world.schedule: 'OFF'
    flow.hello-world.log: 'OFF'

There is no clear way to know which namespace these IDs belong to. Also, the ".log" suffix is confusing.

Proposal

Introduce the namespace as part of the logger path for all configuration keys to make the logging configuration explicit and easier to reason about.

Example of the new syntax:

logger:
  levels:
    mynamespace.myflowId.mytaskId: 'OFF'
    mynamespace.myflowId.mytriggerId: 'OFF'
    mynamespace.myflowId: 'OFF' # to disable server logs for the entire flow
    mynamespace: 'OFF' # to disable server logs for the entire namespace

Benefits

  • Makes logger configuration explicit and more informative.
  • Allows for namespace-level control, e.g., disabling server logs per namespace.
  • Improves UX: no confusing schema with .log

Breaking Change

This change will break existing configurations, as current logger keys would need to be updated to include the namespace prefix.

Metadata

Metadata

Assignees

Labels

area/backendNeeds backend code changesenhancementNew feature or requestkind/breaking-changeCode modifications needed before upgradingkind/highlightOne of the highlights of the upcoming release

Type

No type

Projects

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions