mirror of
https://github.com/revanced/Apktool.git
synced 2024-11-13 07:59:24 +01:00
output as stdout instead of stderr
This commit is contained in:
parent
d4b86475ca
commit
acd335f92d
@ -480,11 +480,36 @@ public class Main {
|
||||
for (Handler handler : logger.getHandlers()) {
|
||||
logger.removeHandler(handler);
|
||||
}
|
||||
LogManager.getLogManager().reset();
|
||||
|
||||
if (verbosity == Verbosity.QUIET) {
|
||||
return;
|
||||
}
|
||||
|
||||
Handler handler = new ConsoleHandler();
|
||||
Handler handler = new Handler(){
|
||||
@Override
|
||||
public void publish(LogRecord record) {
|
||||
if (getFormatter() == null) {
|
||||
setFormatter(new SimpleFormatter());
|
||||
}
|
||||
|
||||
try {
|
||||
String message = getFormatter().format(record);
|
||||
if (record.getLevel().intValue() >= Level.WARNING.intValue()) {
|
||||
System.err.write(message.getBytes());
|
||||
} else {
|
||||
System.out.write(message.getBytes());
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
reportError(null, exception, ErrorManager.FORMAT_FAILURE);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void close() throws SecurityException {}
|
||||
@Override
|
||||
public void flush(){}
|
||||
};
|
||||
|
||||
logger.addHandler(handler);
|
||||
|
||||
if (verbosity == Verbosity.VERBOSE) {
|
||||
|
Loading…
Reference in New Issue
Block a user