mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-13 13:41:58 +00:00
Fix logging implementation error
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <base.hpp>
|
||||
#include <flags.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ fn log_with_writer<F: FnOnce(LogWriter)>(level: LogLevel, f: F) {
|
||||
return;
|
||||
}
|
||||
f(logger.write);
|
||||
if logger.flags.contains(LogFlag::EXIT_ON_ERROR) {
|
||||
if matches!(level, LogLevel::Error) && logger.flags.contains(LogFlag::EXIT_ON_ERROR) {
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <cil/cil.h>
|
||||
|
||||
#include <base.hpp>
|
||||
#include <flags.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user