Log process ID

pull/192/head
M66B 4 years ago
parent b71f8a0246
commit 05f11818bf

@ -78,7 +78,8 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
@Override
protected void onCreate(Bundle savedInstanceState) {
EntityLog.log(this, "Activity create " + this.getClass().getName() +
" version=" + BuildConfig.VERSION_NAME);
" version=" + BuildConfig.VERSION_NAME +
" process=" + android.os.Process.myPid());
Intent intent = getIntent();
if (intent != null)
EntityLog.log(this, intent +

@ -78,7 +78,10 @@ public class ApplicationEx extends Application
super.onCreate();
long start = new Date().getTime();
Log.logMemory(this, "App create version=" + BuildConfig.VERSION_NAME);
EntityLog.log(this, "App create" +
" version=" + BuildConfig.VERSION_NAME +
" process=" + android.os.Process.myPid());
Log.logMemory(this, "App");
getMainLooper().setMessageLogging(new Printer() {
@Override

@ -157,7 +157,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
@Override
public void onCreate() {
EntityLog.log(this, "Service create version=" + BuildConfig.VERSION_NAME);
EntityLog.log(this, "Service create" +
" version=" + BuildConfig.VERSION_NAME +
" process=" + android.os.Process.myPid());
super.onCreate();
if (isBackgroundService(this))

@ -63,7 +63,9 @@ public class WorkerCleanup extends Worker {
@NonNull
@Override
public Result doWork() {
Log.i("Running " + getName());
EntityLog.log(getApplicationContext(),
"Running " + getName() +
" process=" + android.os.Process.myPid());
Thread.currentThread().setPriority(THREAD_PRIORITY_BACKGROUND);
cleanup(getApplicationContext(), false);

Loading…
Cancel
Save