mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: auto-flush logs at exit
This commit is contained in:
@@ -227,7 +227,5 @@ int main(int argc, char** argv, char** envp) {
|
||||
observer.markSuccessfullyExtractedFiles();
|
||||
}
|
||||
|
||||
codeql::Log::flush();
|
||||
|
||||
return frontend_rc;
|
||||
}
|
||||
|
||||
@@ -110,6 +110,8 @@ class Log {
|
||||
Level level;
|
||||
};
|
||||
|
||||
~Log() { flushImpl(); }
|
||||
|
||||
// Flush logs to the designated outputs
|
||||
static void flush() { instance().flushImpl(); }
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ void buildTarget(Target& target, bool dryRun) {
|
||||
if (!exec(argv)) {
|
||||
DIAGNOSE_ERROR(build_command_failed, "The detected build command failed (tried {})",
|
||||
absl::StrJoin(argv, " "));
|
||||
codeql::Log::flush();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user