set exit code of log ExitOnError to -1

This commit is contained in:
LoveSy 2025-03-04 08:21:55 +08:00 committed by John Wu
parent 27fd79176a
commit e8a3bf82c6

View File

@ -84,7 +84,7 @@ fn log_with_writer<F: FnOnce(LogWriter)>(level: LogLevel, f: F) {
}
f(logger.write);
if matches!(level, LogLevel::ErrorCxx) && (logger.flags & LogFlag::ExitOnError) != 0 {
exit(1);
exit(-1);
}
}