getditto / DittoSwiftTools

Diagnostic and Debugging Tools for DittoSwift
MIT License
9 stars 2 forks source link

Move DittoLogger.setLogFileURL(logFileURL) outside of ExportLogs #72

Closed texasRanger09 closed 10 months ago

texasRanger09 commented 10 months ago

fixes #67

magicwave commented 10 months ago
texasRanger09 commented 10 months ago

@magicwave

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.

It will need to be merged into main and v4. main is for apps running on Ditto <v4 and v4 is for apps running on Ditto >v4.

okdistribute commented 10 months ago

We do not support v4 branch anymore thankfully we merged that. So we can delete that branch to remove confusion?

main is v4 compatible. https://github.com/getditto/DittoSwiftTools/pull/64