We disable Log4j2's shutdown hook in favor of our own. This prevents a race between two different shutdown mechanisms that can result in log messages being lost. Unfortunately, this doesn't work with Log 4j 2.18 as SpringBootPropertySource does not implement some default methods on the PropertySource interface that now must be implemented for its property to be considered.