Skip to content

Commit

Permalink
fix(applogger): expose MK_EVENT LOG_DEBUG (#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone authored Jul 24, 2023
1 parent a9a697d commit 11ec90f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public void i(String tag, String message) {
logger.i(String.format("%s: %s", tag, message));
}

public void d(String tag, String message) {
logger.d(String.format("%s: %s", tag, message));
}

public void deleteOldLog() {
logger.deleteOldLog();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ void run(Context c, PreferenceManager pm, AppLogger logger, Gson gson, Settings
case "WARNING":
logger.w(TAG, event.value.message);
break;
case "DEBUG":
logger.d(TAG, event.value.message);
break;
default:
logger.i(TAG, event.value.message);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ interface ILogger {
fun e(msg: String)
fun w(msg: String)
fun i(msg: String)
fun d(msg: String)
fun api(msg: String)
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class InAppLogger(context: Context) : LoggerManager(context) {
saveLog("${DateFormat.format("yyyy-MM-dd hh:mm:ss a", Date())} : ${LogType.INFO.name} : $msg", LogType.INFO.name)
}

override fun d(msg: String) {
saveLog("${DateFormat.format("yyyy-MM-dd hh:mm:ss a", Date())} : ${LogType.DEBUG.name} : $msg", LogType.DEBUG.name)
}

override fun api(msg: String) {
saveLog("${DateFormat.format("yyyy-MM-dd hh:mm:ss a", Date())} : ${LogType.API.name} : $msg", LogType.API.name)
}
Expand Down

0 comments on commit 11ec90f

Please sign in to comment.