move common output to fine LOG level

- only visible in VERBOSE
This commit is contained in:
Connor Tumbleson 2017-05-05 07:51:24 -04:00
parent e2f77aac18
commit 90b7d4b9b5
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75
2 changed files with 9 additions and 3 deletions

View File

@ -486,7 +486,7 @@ public class Main {
+ "For smali/baksmali info, see: https://github.com/JesusFreke/smali"); + "For smali/baksmali info, see: https://github.com/JesusFreke/smali");
} }
private static void setupLogging(Verbosity verbosity) { private static void setupLogging(final Verbosity verbosity) {
Logger logger = Logger.getLogger(""); Logger logger = Logger.getLogger("");
for (Handler handler : logger.getHandlers()) { for (Handler handler : logger.getHandlers()) {
logger.removeHandler(handler); logger.removeHandler(handler);
@ -509,7 +509,13 @@ public class Main {
if (record.getLevel().intValue() >= Level.WARNING.intValue()) { if (record.getLevel().intValue() >= Level.WARNING.intValue()) {
System.err.write(message.getBytes()); System.err.write(message.getBytes());
} else { } else {
if (record.getLevel().intValue() >= Level.INFO.intValue()) {
System.out.write(message.getBytes()); System.out.write(message.getBytes());
} else {
if (verbosity == Verbosity.VERBOSE) {
System.out.write(message.getBytes());
}
}
} }
} catch (Exception exception) { } catch (Exception exception) {
reportError(null, exception, ErrorManager.FORMAT_FAILURE); reportError(null, exception, ErrorManager.FORMAT_FAILURE);

View File

@ -55,7 +55,7 @@ public class ResStyleValue extends ResBagValue implements
ResResSpec spec = mItems[i].m1.getReferent(); ResResSpec spec = mItems[i].m1.getReferent();
if (spec == null) { if (spec == null) {
LOGGER.info(String.format("null reference: m1=0x%08x(%s), m2=0x%08x(%s)", LOGGER.fine(String.format("null reference: m1=0x%08x(%s), m2=0x%08x(%s)",
mItems[i].m1.getRawIntValue(), mItems[i].m1.getType(), mItems[i].m2.getRawIntValue(), mItems[i].m2.getType())); mItems[i].m1.getRawIntValue(), mItems[i].m1.getType(), mItems[i].m2.getRawIntValue(), mItems[i].m2.getType()));
continue; continue;
} }