You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 10, 2024. It is now read-only.
"If the resource variable cannot be converted to a URL, for example due to a MalformedURLException, then search for the resource from the classpath by calling org.apache.log4j.helpers.Loader.getResource(resource, Logger.class) which returns a URL. Note that the string "log4j.properties" constitutes a malformed URL."
However, the way the LoggingConfiguration configure method is written, it doesn't do that. If the log4jConfigurationFile (as provided by a -Dlog4j.configuration property) is not null (for example, "mylog4j.properties") it will call loadLog4jConfigurationFile which tries to create a URL and which throws a RuntimeException for the Malformed URL, instead of falling back on looking for the resource in the classpath, which it only does if the log4jConfigurationFile is null.