You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid repeating logging code (android.util.Log ...) of d methods with the default tag by calling d methods with customized tag. This will give you the flexibility of being able to change the logging library.
Example:
[Current]
static public int d(String m) {
Throwable t = new Throwable();
String logtag = LOG_TAG + ": " + t.getStackTrace()[1].getClassName();
return android.util.Log.wtf(logtag, notEmpty(m));
}
[Proposal]
static public int d(String m) {
Throwable t = new Throwable();
String logtag = LOG_TAG + ": " + t.getStackTrace()[1].getClassName();
return d(logtag, notEmpty(m));
}
I hope this helps.
The text was updated successfully, but these errors were encountered:
Interesting idea. I can see how using one centralized logging method would make it quicker to change log levels. Just wondering though in terms of other logging libraries... which others where you thinking?
(PS, forked to my repo since I no longer have commits to this one)
Avoid repeating logging code (android.util.Log ...) of d methods with the default tag by calling d methods with customized tag. This will give you the flexibility of being able to change the logging library.
Example:
[Current]
static public int d(String m) {
Throwable t = new Throwable();
String logtag = LOG_TAG + ": " + t.getStackTrace()[1].getClassName();
return android.util.Log.wtf(logtag, notEmpty(m));
}
[Proposal]
static public int d(String m) {
Throwable t = new Throwable();
String logtag = LOG_TAG + ": " + t.getStackTrace()[1].getClassName();
return d(logtag, notEmpty(m));
}
I hope this helps.
The text was updated successfully, but these errors were encountered: