Merge pull request #5918 from tweag/tty-logs

Print build logs when not connected to a TTY
This commit is contained in:
Eelco Dolstra 2022-01-18 19:42:01 +01:00 committed by GitHub
commit 9901cb96c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -270,11 +270,15 @@ void mainWrapped(int argc, char * * argv)
if (legacy) return legacy(argc, argv); if (legacy) return legacy(argc, argv);
} }
verbosity = lvlNotice;
settings.verboseBuild = false;
evalSettings.pureEval = true; evalSettings.pureEval = true;
setLogFormat("bar"); setLogFormat("bar");
settings.verboseBuild = false;
if (isatty(STDERR_FILENO)) {
verbosity = lvlNotice;
} else {
verbosity = lvlInfo;
}
Finally f([] { logger->stop(); }); Finally f([] { logger->stop(); });