Skip to content

Commit

Permalink
[android] 回滚原有方法
Browse files Browse the repository at this point in the history
  • Loading branch information
biezhihua committed Sep 25, 2024
1 parent 37f1917 commit 74eee59
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions GaiaXAndroidJS/src/main/kotlin/com/alibaba/gaiax/js/utils/Log.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ object Log {

const val TAG = "GaiaX.JS"

fun d(tag: String, msg: String) {
log(DEBUG, tag, msg)
fun d(tag: String?, msg: String) {
log(DEBUG, tag ?: TAG, msg)
}

fun e(tag: String, msg: String) {
log(ERROR, tag, msg)
fun e(tag: String?, msg: String) {
log(ERROR, tag ?: TAG, msg)
}

fun log(type: Int, tag: String, msg: String) {
Expand All @@ -51,6 +51,13 @@ object Log {
log(type, if (tag.isEmpty()) TAG else "${TAG}.${tag}", block())
}
}

/**
* 不可删除、不可修改
*/
fun isLog(): Boolean {
return defaultLog
}
}

val defaultLog by lazy {
Expand Down

0 comments on commit 74eee59

Please sign in to comment.