Skip to content

Commit

Permalink
fix AppLogViewerActivity when a log is message is null
Browse files Browse the repository at this point in the history
  • Loading branch information
maxme committed Feb 2, 2015
1 parent 728a121 commit 7c3ec06
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,37 @@ public static void enableRecording(boolean enable) {
}

public static void v(T tag, String message) {
message = StringUtils.notNullStr(message);
Log.v(TAG + "-" + tag.toString(), message);
addEntry(tag, LogLevel.v, message);
}

public static void d(T tag, String message) {
message = StringUtils.notNullStr(message);
Log.d(TAG + "-" + tag.toString(), message);
addEntry(tag, LogLevel.d, message);
}

public static void i(T tag, String message) {
message = StringUtils.notNullStr(message);
Log.i(TAG + "-" + tag.toString(), message);
addEntry(tag, LogLevel.i, message);
}

public static void w(T tag, String message) {
message = StringUtils.notNullStr(message);
Log.w(TAG + "-" + tag.toString(), message);
addEntry(tag, LogLevel.w, message);
}

public static void e(T tag, String message) {
message = StringUtils.notNullStr(message);
Log.e(TAG + "-" + tag.toString(), message);
addEntry(tag, LogLevel.e, message);
}

public static void e(T tag, String message, Throwable tr) {
message = StringUtils.notNullStr(message);
Log.e(TAG + "-" + tag.toString(), message, tr);
addEntry(tag, LogLevel.e, message + " - exception: " + tr.getMessage());
addEntry(tag, LogLevel.e, "StackTrace: " + getStringStackTrace(tr));
Expand Down

0 comments on commit 7c3ec06

Please sign in to comment.