Create log's file to save synchro's history
As we still encounter issue about data consumation and as eDrive is still suspected to be responsible. I should add a kind of logging system which will save in a file information about synchronisation for each file that is synchronized.
Pist of reflexion
- one possibility is to create a log system which will add a new line for each file synchronized in a "synchro.log" file, created in eDrive's storage space on device. The file will contain data such as:
- Type of synchro in following list: remote creation, local creation, remote update, local update, remote delete, local delete.
- Local path of the file
- Remote path use for transfer
- Timestamp of transfer begining
- Timestamp of transfer ending
- Result of transfer : OK, KO
- [optional] Size of the file transfered
- [optional] last etag / new etag
- Another possibility is to use a DB system.
if file system is used instead of db. Where should it be placed ? into private folder or in public folder ? As it is for debug and help resolving problem, an easy access looks like a better option. But if it is DB, There won't be choice possible: it will be in private folder of app.
Concurrent access to the file will be a problem.
How many time should we keep data into this file ? because it must remove old operation after a time. How to decide which time is good ? one week ? two week ? a month ? two month ? three month?
- Logging instruction will have to run in OperationManagerService.java not in each different operation.