Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

edrive improve all message logs

Summary

edrive is a system app which run in background. Logs should contains more context. It will be really helpful for debug purpose. Also, by default even "DEBUG" level logs are displayed on stable build by default "INFO" log should be enough.

The problem

Steps to reproduce

adb logcat --pid=$(adb shell pidof -s foundation.e.drive)

What is the current behavior?

01-20 22:08:19.219  2787  2787 I ObserverService: onDestroy()                                               
01-20 22:09:26.830  2787  2787 I ScreenOffReceiver: onReceive                                                          
01-20 22:11:27.346  2787  2787 I ScreenOffReceiver: onReceive                                                          
01-20 22:11:27.346  2787  2787 I CommonUtils: haveNetworkConnexion()                                                   
01-20 22:11:27.350  2787  2787 D ScreenOffReceiver: onReceive: ACTION_SCREEN_OFF                                       
01-20 22:11:27.359  2787  2787 I ObserverService: onStartCommand(1)                                                    
01-20 22:11:27.360  2787  2787 D ObserverService: ServiceExceptionHandler already set!                                 
01-20 22:11:27.367  2787  2787 W ObserverService: Delay between now and last call is too short                         
01-20 22:12:14.335  2787  2787 I ScreenOffReceiver: onReceive 

What is the expected correct behavior?

onDestroy, onReceive, onStartCommand(1)... are not really useful. What we want to know in the example below is why the delay is too short and when the next sync will occurs.

Solutions

Here a example of guideline for writing message log, we can reuse these rule which are relevant especially the number 6.

cc @rhunault