We have a similar problem to that of the asker of this question -- after upgrading from log4j-2.17.1 to 2.17.2 the application, though otherwise working, is not logging anything.
Having read the release notes, I see the following part:
- By default, the only remote protocol allowed for loading configuration files is HTTPS. Users can specify a system property to allow others or prevent remote loading entirely.
Indeed, in our case the log4j2.xml
is downloaded via regular (non-encrypted) HTTP, and that likely explains our problem (as well as that of the other guy). However, try as I might, I cannot find, how to (re)enable the ability to use HTTP -- which system property is it, that now controls the capability?
Thanks!
CodePudding user response:
The system property you are looking for is called log4j2.Configuration.allowedProtocols
(cf. documentation) and should contained a comma separated list of URL schemes (e.g. "http,https").
You can set it using any available property source (e.g. a log4j.component.properties
file or a Java system property).