From 5e62c0afc50e52065685bb40b96d7dccc036c45e Mon Sep 17 00:00:00 2001 From: Erik Johansson Date: Wed, 4 Jul 2018 00:14:56 +0200 Subject: [PATCH] Include thread id in debug log --- .../health/openscale/gui/preferences/AboutPreferences.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android_app/app/src/main/java/com/health/openscale/gui/preferences/AboutPreferences.java b/android_app/app/src/main/java/com/health/openscale/gui/preferences/AboutPreferences.java index 9c865de1..d0fcd02d 100644 --- a/android_app/app/src/main/java/com/health/openscale/gui/preferences/AboutPreferences.java +++ b/android_app/app/src/main/java/com/health/openscale/gui/preferences/AboutPreferences.java @@ -80,8 +80,9 @@ public class AboutPreferences extends PreferenceFragment { @Override protected void log(int priority, String tag, String message, Throwable t) { - writer.printf("%s %s %s: %s\n", - format.format(new Date()), priorityToString(priority), tag, message); + final long id = Thread.currentThread().getId(); + writer.printf("%s %s [%d] %s: %s\n", + format.format(new Date()), priorityToString(priority), id, tag, message); } }