Skip to content

Commit 74eee59

Browse files
committed
[android] 回滚原有方法
1 parent 37f1917 commit 74eee59

File tree

1 file changed

+11
-4
lines changed
  • GaiaXAndroidJS/src/main/kotlin/com/alibaba/gaiax/js/utils

1 file changed

+11
-4
lines changed

GaiaXAndroidJS/src/main/kotlin/com/alibaba/gaiax/js/utils/Log.kt

+11-4
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ object Log {
2222

2323
const val TAG = "GaiaX.JS"
2424

25-
fun d(tag: String, msg: String) {
26-
log(DEBUG, tag, msg)
25+
fun d(tag: String?, msg: String) {
26+
log(DEBUG, tag ?: TAG, msg)
2727
}
2828

29-
fun e(tag: String, msg: String) {
30-
log(ERROR, tag, msg)
29+
fun e(tag: String?, msg: String) {
30+
log(ERROR, tag ?: TAG, msg)
3131
}
3232

3333
fun log(type: Int, tag: String, msg: String) {
@@ -51,6 +51,13 @@ object Log {
5151
log(type, if (tag.isEmpty()) TAG else "${TAG}.${tag}", block())
5252
}
5353
}
54+
55+
/**
56+
* 不可删除、不可修改
57+
*/
58+
fun isLog(): Boolean {
59+
return defaultLog
60+
}
5461
}
5562

5663
val defaultLog by lazy {

0 commit comments

Comments
 (0)