Skip to content

Conversation

ayuxsh009
Copy link

fixes #11930

Problem

The current logger configuration does not include the namespace in the key path, causing ambiguity when multiple flows or tasks share the same IDs across namespaces.

Solution

Introduced namespace-aware logger paths to make logging configuration explicit and easier to manage.

Changes

  • LogService.java: Updated logger factory methods to include the namespace in logger names.

    • Tasks: {namespace}.{flowId}.{taskId}
    • Triggers: {namespace}.{flowId}.{triggerId}
    • Executions: {namespace}.{flowId}
  • RunContextLogger.java: Updated constructor to use namespace-aware logger names.

  • base.xml:

    • Removed generic logger definitions.
    • Added examples and documentation for namespace-aware configuration.
  • Updated JavaDoc comments and configuration documentation.

Testing

  • All existing tests pass.
  • Logger names correctly include the namespace in all cases.
  • Hierarchical logging configuration verified.

Copy link
Member

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
Thanks for your contribution.
We may not want to remove the base logger name (flows/executions/tasks/triggers) as it allows diabling globaly the logger category.
I asked internally for confirmation.

@ayuxsh009
Copy link
Author

Thanks for the feedback!
That makes sense , I’ll keep the base logger names and just prefix them with the namespace, like flows.{namespace}.{flowId} etc.
Let me know if that works before I update the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To review

Development

Successfully merging this pull request may close these issues.

Make logger configuration namespace-aware for clarity and specificity

2 participants