Skip to content

Dynamic log configuration APIs don't allow setting the log level for loggers that aren't explicitly configured #13155

@yashmayya

Description

@yashmayya
  • Support for dynamic log configuration APIs was added in Adding logger utils and allow change logger level at runtime #9180 and documented in add documentation for dynamic logging pinot-contrib/pinot-docs#132
  • Currently, these APIs don't allow modifying the level of loggers that aren't explicitly configured.
  • For instance, let's say that a Pinot controller process is started with the log4j configuration file containing log levels defined for the following loggers: root, org.apache.pinot.tools.admin and org.reflections (see this log4j config file for reference).
  • Now, if we attempt to change the log level of the org.apache.pinot.controller.helix.core.realtime.SegmentCompletionManager class via PUT /loggers/org.apache.pinot.controller.helix.core.realtime.SegmentCompletionManager?level=DEBUG, this returns the following response: {"code":500,"error":"Logger - org.apache.pinot.controller.helix.core.realtime.SegmentCompletionManager not found"}
  • This is because the check here only checks whether the logger name is in the list of loggers that are already explicitly configured.
  • This severely limits the usefulness of the dynamic log configuration API as it prevents the modification of all loggers that aren't explicitly configured in the log4j configuration file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions