Inspired by https://github.com/julia-vscode/LanguageServer.jl/pull/1222, we may need some specialized facilities to control log messages during precompilation.