Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Reduce logs #735

Closed
superpoussin22 opened this issue Aug 7, 2019 · 2 comments
Closed

[feature] Reduce logs #735

superpoussin22 opened this issue Aug 7, 2019 · 2 comments

Comments

@superpoussin22
Copy link

superpoussin22 commented Aug 7, 2019

The idea is to reduce the logs of jadx cli

it's doable with an xml file containing :
<configuration> <root level="OFF"> </root> </configuration>

then the scripts must be modified :

For linux and mac
DEFAULT_JVM_OPTS="\"-Xms128M\" \"-Xmx4g\" \"-XX:+UseG1GC\" \"-Dlogback.configurationFile=${APP_HOME}/bin/jadx.xml\""
and for windows :
set DEFAULT_JVM_OPTS="-Xms128M" "-Xmx4g" "-XX:+UseG1GC" "-Dlogback.configurationFile=%APP_HOME%/bin/jadx.xml"

@skylot
Copy link
Owner

skylot commented Aug 8, 2019

@superpoussin22 thanks for this solution, but for me, it looks like a workaround.
So I decided to make it more configurable and add options for control log level to jadx cli:

--log-level        - set log level, values: QUIET, PROGRESS, ERROR, WARN, INFO, DEBUG, default: PROGRESS
-q, --quiet        - turn off output (set --log-level to QUIET)
-v, --verbose      - verbose output (set --log-level to DEBUG)

By default jadx will output only "progress" info like:

INFO  - loading ...
INFO  - processing ...
ERROR - finished with errors, count: 1

And if you want you can disable output completely using -q or --quiet option

Also, your solution with custom log config via -Dlogback.configurationFile= will continue to work. For this, I add detection of such configuration and if found jadx will ignore any log-level options.

As always you can check these changes in latest unstable build

@skylot skylot mentioned this issue Aug 8, 2019
@superpoussin22
Copy link
Author

tjanks @skylot, that's perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants