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 @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
EntityLog.log(this, "Activity create " + this.getClass().getName() + EntityLog.log(this, "Activity create " + this.getClass().getName() +
" version=" + BuildConfig.VERSION_NAME); " version=" + BuildConfig.VERSION_NAME +
" process=" + android.os.Process.myPid());
Intent intent = getIntent(); Intent intent = getIntent();
if (intent != null) if (intent != null)
EntityLog.log(this, intent + EntityLog.log(this, intent +

@ -78,7 +78,10 @@ public class ApplicationEx extends Application
super.onCreate(); super.onCreate();
long start = new Date().getTime(); 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() { getMainLooper().setMessageLogging(new Printer() {
@Override @Override

@ -157,7 +157,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
@Override @Override
public void onCreate() { 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(); super.onCreate();
if (isBackgroundService(this)) if (isBackgroundService(this))

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

Loading…
Cancel
Save