mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-22 17:57:35 +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()) {
|
for (Handler handler : logger.getHandlers()) {
|
||||||
logger.removeHandler(handler);
|
logger.removeHandler(handler);
|
||||||
}
|
}
|
||||||
|
LogManager.getLogManager().reset();
|
||||||
|
|
||||||
if (verbosity == Verbosity.QUIET) {
|
if (verbosity == Verbosity.QUIET) {
|
||||||
return;
|
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);
|
logger.addHandler(handler);
|
||||||
|
|
||||||
if (verbosity == Verbosity.VERBOSE) {
|
if (verbosity == Verbosity.VERBOSE) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user