Hide "Loading package environment" message
#15145 (closed) introduced a new log message when a package database is loaded from a file. I'd like a way to hide this message. I tested with
-v0, without success.
This poses problem in build system, such as bazel / rules_haskell, were the output is spammed by this message for each compiler step. See https://github.com/tweag/rules_haskell/issues/969
[nix-shell:~]$ touch .ghc.environment.x86_64-linux-8.6.3 [nix-shell:~]$ ghc Loaded package environment from /home/guillaume/.ghc.environment.x86_64-linux-8.6.3 ghc: no input files Usage: For basic information, try the `--help' option.
Loaded package environment from ... is annoying.
Apparenly that's a log message with
SevInfo. I did not found anyway to filter theses log messages. I tried
-ddump-to-file without success.
-ddump-json changes the format of the output, but this stays in stderr.
I'll be happy to know another option to disable that or to have an option to disable log message based on severity.