Skip to content

loader should log where it found config files #4058

@markyag-spgdji

Description

@markyag-spgdji

In several places in Loader, such as here:
https://github.com/apache/logging-log4j2/blob/2.x/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Loader.java#L94
There’s a message at trace level saying basically “Trying to find [FILENAME] using THINGY”.
This is very useful, because it lets you know all the places that log4j is looking for config files.
However, there’s no good way to find which of these attempts succeeded.
Earlier today I had to put a debug breakpoint inside this class to find out which log4j2.xml was getting loaded.
It would be nice if successful attempts were logged, perhaps even at a level higher than trace. (maybe debug??)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions