NominatimGeocoderBackend
NominatimGeocoderBackend copied to clipboard
Added location caching; added logging to file
Added caching of locations; added logging to file
Reply to: Do you think it's worth pulling in a third-party dependency and additional permission for a log file feature, that is unlikely to be interesting for the majority of users?
logcat should be sufficient for most debug cases. You could also make logging to file only available in the debug version.
I've added the log to file feature because I spent tens of hours debugging in the field. Things can work when you are at home, but it does not when you are outside (run on battery, no wifi, specific netowrk CELLs you don't have in DB, etc.). Unfortunately, logcat is useless for regular user as well as for long time logging. You have to have adb (what regular user does not have), you have to connect phone to PC (what you don't have outside), logcat contains a lot of mess what makes the log unusable. So I wanted to give the easiest possibility to user to grab the logs and send it to developer. I can remember the days I wonted to report some bug, but I don't know adb and logcat etc. Regarding the perrmissions - I completelly agree with you - the smallest amount of permission is better - you know, I wan't to have INSTALL_PROVIDER permission in UnifiedNLP standalone for the same reason. I cannot see any other possibility. This option is for 1% (or less) users, but it's important to find all bugs in the service - because newer version of Android usually means that something does not work - because of battery saving etc. And this is something you cannot find at home by computer.
@thuryn Could you please separate location caching and file logging in 2 separate pull requests? It would simplify reviewing.