getditto / DittoAndroidTools

Diagnostic and Debugging Tools for Ditto Android SDK
MIT License
6 stars 1 forks source link

Extract DittoLogger.setLogFile(logFile.toString()) from export logs #25

Closed texasRanger09 closed 10 months ago

texasRanger09 commented 10 months ago

fixes #20

There is a race condition happening from when you set DittoLogger.setLogFileURL and Ditto starts writing to the log file with when the file is exported. The first time you export the logs the log file is blank because the file is exported before Ditto has a chance to start writing to the log file. When we move DittoLogger.setLogFileURL out of the ExportLogs tool this gives Ditto enough time to write logs to the file before it is exported.

byoung-ditto commented 10 months ago

We copy/pasted the Export Logs code into our Android project (ATAK). And made local modifications so it wont be straightforward to test this fix in ATAK. Once this is a Maven module, we can refactor ATAK to pull from there