From ee2025ca4da046fb3cbf4e14fddad1590e5f1888 Mon Sep 17 00:00:00 2001 From: xuqm Date: Wed, 15 Feb 2023 18:05:58 +0800 Subject: [PATCH] =?UTF-8?q?LogHelper.kt=20=E6=97=A5=E5=BF=97=E5=B7=A5?= =?UTF-8?q?=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/org/bjca/trust/push/common/LogHelper.kt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/push/src/main/java/cn/org/bjca/trust/push/common/LogHelper.kt b/push/src/main/java/cn/org/bjca/trust/push/common/LogHelper.kt index 0fe68b0..341d61e 100644 --- a/push/src/main/java/cn/org/bjca/trust/push/common/LogHelper.kt +++ b/push/src/main/java/cn/org/bjca/trust/push/common/LogHelper.kt @@ -35,16 +35,24 @@ class LogHelper { /** * d */ - fun d(message: String, tag: String? = null) { + fun d(message: String) { + d(message, null, null) + } + + fun d(message: String, tag: String) { d(message, null, tag) } - fun d(message: String, tr: Throwable?, tag: String? = null) { + fun d(message: String, tr: Throwable) { + d(message, tr, null) + } + + fun d(message: String, tr: Throwable?, tag: String?) { println(tr, tag) { if (tr != null) { Log.d(TAG, message, tr) } else { - Log.e(TAG, message) + Log.d(TAG, message) } } }