Skip to content

log4j root logger overwritten by log4j.properties in spring-boot jar #1348

@tkruse

Description

@tkruse

Hi,

we have our log4j configuration in a file called log4j-custom.properties. We load this on embedded tomcat startup using -Dlog4j.configuration=log4j-custom.properties.
This has the effect that those properties will be loaded first on startup. However, startup then continues to find log4j.properties and basic-log4j.properties in the spring-boot jar, which set the log4j.rootCategory (should be rootLogger by now I believe), meaning also our Appenders get closed.

I have no clear suggestion of how to prevent this right now, nor do I know whether this is a bug or not, but it took us by surprise.

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