feature request: loader should log where it found config files

"Yagnatinsky, Mark via log4j-user" <[email protected]> Fri, 27 Feb 2026 22:24:33 +0000
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <BYAPR10MB346355437C05F83A766F034EE473A@BYAPR10MB3463.namprd10.prod.outlook.com>
--_000_BYAPR10MB346355437C05F83A766F034EE473ABYAPR10MB3463namp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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 leve=
l higher than trace.  (maybe debug??)

Thoughts?

________________________________

The information contained in this message is intended only for the recipien=
t, and may be a confidential attorney-client communication or may otherwise=
 be privileged and confidential and protected from disclosure. If the reade=
r of this message is not the intended recipient, or an employee or agent re=
sponsible for delivering this message to the intended recipient, please be =
aware that any dissemination or copying of this communication is strictly p=
rohibited. If you have received this communication in error, please immedia=
tely notify us by replying to the message and deleting it from your compute=
r. S&P Global Inc. reserves the right, subject to applicable local law, to =
monitor, review and process the content of any electronic message or inform=
ation sent to or from S&P Global Inc. e-mail addresses without informing th=
e sender or recipient of the message. By sending electronic message or info=
rmation to S&P Global Inc. e-mail addresses you, as the sender, are consent=
ing to S&P Global Inc. processing any of your personal data therein.

--_000_BYAPR10MB346355437C05F83A766F034EE473ABYAPR10MB3463namp_--