Previously, Slf4jLoggingSystem would install SLF4JBridgeHandler into
JUL but would only remove a single root handler that was a
ConsoleHandler. If there were was than one root handler or the single
root handler was of a different type, they would not be uninstalled.
When deploying an application to Tomcat, this led to duplicate log
messages appearing in Tomcat’s console output and to logging from
other application or Tomcat itself being routed into an
application-specific log file enabled using the logging.file
configuration property.
A secondary, related problem was that LogbackLoggingSystem installs a
LevelChangePropagator so that Logback’s log level configuration is
propagated into JUL. This meant that an individual Boot app with
custom log level configuration could change the log levels of Tomcat
itself and of any other applications that had been deployed to Tomcat
and use JUL.
This commit updates both Slf4jLoggingSystem and LogbackLoggingSystem
so that they only change JUL’s configuration if it hasn’t already been
customized. The configuration is deemed to have not been customised if
there’s a single root handler and its a console handler.
Closes gh-13470
Before 2.0.2, if profiles were activated via the environment using the
active and include profile property, profiles specified via the active
property would take precedence. This commit restores that behavior.
Fixes gh-13513
Refine the property source cache key fix so that a copy of the
key is only taken when the values change. This allows us to
retain the previous performance optimization of not creating
unnecessary string arrays.
Closes gh-13344
Update `SpringIterableConfigurationPropertySource` so that the cache
key from a `MapPropertySource` is invalidated when the map contents
changes.
Prior to this commit, the actual keys of the map were used as the key.
This meant that if the underlying map changed, they key wouldn't be
invalidated because it ultimately pointed to the same object instance.
See gh-13344
Prior to this commit, the `DefaultErrorWebExceptionHandler` would parse
the HTTP "Accept" headers when routing the request to the error handler;
if an error occured during parsing, an `InvalidMediaTypeException` would
be thrown and break the error handling for this request.
This commit ignores those exceptions and makes sure that the error
handling function does not override the response status or the error
itself with those exceptions.
Closes: gh-13372