Add `LoggersEndpoint` that can enables listing and configuration of log
levels. This actuator builds on top of the `LoggingSystem` abstraction
and implements support for Logback, Log4J2, and JUL. The LoggingSystem
interface is modified to require each implementation to list the
configuration of all loggers as well as an individual logger by name.
The MVC endpoint exposes these behaviors at `GET /loggers` and
`GET /loggers/{name}` (much like the metrics actuator).
In addition `POST /loggers/{name}` allows users to modify the level for a given
logger. This modification is passed to the logging implementation, which
then decides, as an internal implementation detail, what the final outcome
of the modification is (e.g. changing all unconfigured children). Users
are then expected to request the listing of all loggers to see what has
changed internally to the logging system.
Closes gh-7086
This commit switches off the auto-configured JspServlet's
development mode by default. Development mode is then switched on
when DevTools is on the class path.
Closes gh-7039
ErrorPageFilter contained an optimisation for looking up the path
of an error page by exception type. For cases where there was no
mapping for the type of the exception that was thrown but there
was a mapping for one of its super classes, it was intended to
speed up the lookup. Unfortunately, there was a bug in the
implementation which meant that the optimisation had no effect.
Analysis with JMH reveals that for an Exception with a deep type
hierarchy, such as Spring Framework's UnsatisfiedDependencyException,
and an error page mapping for Exception, searching up the hierarchy
until a mapping is found takes 0.0000001s. With the same mapping,
a lookup for Exception takes 0.00000001s, i.e. it's 10x faster.
The optimisation, when correctly implemented, brings the time for
UnsatisfiedDependencyException down to 0.00000001s and into line
with a lookup for Exception. However, the amount of time involved is
so small compared to the overall time spent processing a request that
the added complexity of the optimisation is not justified.
Closes gh-7010
Every classes that's compiled by Kotlin is annotated with
kotlin.Metadata. The attributes of this annotation always differ so
if they are used in the cache key, context caching will effectively
be disabled.
This commit updates the key used by ImportsContextCustomizer to
ignore the kotlin.Metadata annotation. Additionally, to align with
with Java where annotations in java.lang.annotation are ignored,
annotations in kotlin.annotation are also ignored.
Closes gh-7101