Skip to content

Extend logging handling and exposure #45854

Closed as not planned
Closed as not planned
@cdprete

Description

@cdprete

Hello.

For Spring Boot 4, I would like to suggest the following modifications and/or extensions around the Spring Boot Logging system:

  • as already happens since years with Lo4j2 and Logback, Spring Boot Logging should allow to configure multiple appenders that can potentially log to different files or get triggered on different log levels (e.g.: https://logback.qos.ch/manual/filters.html#thresholdFilter).
    • of course, external log files should then also be possible.
  • the rolling strategies should be extended to allow also the rolling of the log files by time and not just by size
  • the /logFile Actuator endpoint should be converted to:
    • /logFiles: returns a list of the log files currently handled, including rotated ones.
    • /logFiles/{filename}: return the chunked content of the selected log file as it's done today by /logFile.
  • the /loggers/{name} endpoint should allow to change the log level also if the logging is configured externally (e.g.: logback.xml or log4j2.xml) and loaded by logging.config.
    Maybe it's already the case, but I fail to find some documentation that really explains it, since every example I found configures the logging directly in the application.yaml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions