SUPERAndroidAnalyzer / super

Secure, Unified, Powerful and Extensible Rust Android Analyzer
https://superanalyzer.rocks/
GNU General Public License v3.0
421 stars 59 forks source link

Improve logging #95

Closed gnieto closed 8 years ago

gnieto commented 8 years ago

While I was adding tests to apktool manifest parsing, I saw that 'Config' is passed sometimes to only forward the 'is_verbose' parameter.

With this changes it should be able to get rid of having to pass that struct to some parts of the apliaction. Also, it will make easier to add debug information (I've added a quick example for the apktool manifest parsing: check the second commit).

I understand that maybe you don't like this approach, so, feel free to close the PR :) On the other hand, if you like it, I can modify the calls to 'print_warning' and 'print_error' to remove the 'is_verbose' parameter.

gnieto commented 8 years ago

@Razican So, you are suggesting to change all the:

if is_verbose { print_vulnerability(...) }

to

print_vulnerability(...)

no?

Razican commented 8 years ago

@gnieto right, and the if can be done the first ting inside the function.

gnieto commented 8 years ago

@Razican Done :)