fix: throwable not print in console

This commit is contained in:
2023-10-03 22:45:05 +08:00
parent a572c65677
commit 4f25c89ea7

View File

@@ -110,13 +110,13 @@ object YLog {
*/
private fun log(type: Type, msg: String, e: Throwable? = null) {
val isAndroid = "android.util.Log".hasClass()
val mixedContent = "[${Configs.tag}][${type.alias}] $msg"
/**
* 打印 Log
* @param msg 消息内容
*/
fun innerLog(msg: String) {
val mixedContent = "[${Configs.tag}][${type.alias}] $msg"
when {
isAndroid -> when (type) {
Type.DEBUG -> Log.d(Configs.tag, msg, e)