mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 02:20:14 +08:00
Add soutv
for debugging purposes
This commit is contained in:
parent
1e93da9a09
commit
16d6c56202
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
package net.mamoe.mirai.qqandroid.utils
|
package net.mamoe.mirai.qqandroid.utils
|
||||||
|
|
||||||
|
import net.mamoe.mirai.utils.DefaultLogger
|
||||||
|
import net.mamoe.mirai.utils.debug
|
||||||
import kotlin.reflect.KClass
|
import kotlin.reflect.KClass
|
||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
import kotlin.reflect.KProperty1
|
import kotlin.reflect.KProperty1
|
||||||
@ -26,6 +28,12 @@ private fun <T> Sequence<T>.joinToStringPrefixed(prefix: String, transform: (T)
|
|||||||
return this.joinToString(prefix = "$prefix$indent", separator = "\n$prefix$indent", transform = transform)
|
return this.joinToString(prefix = "$prefix$indent", separator = "\n$prefix$indent", transform = transform)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private val SoutvLogger by lazy { DefaultLogger("soutv") }
|
||||||
|
internal fun Any?.soutv(name: String) {
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
SoutvLogger.debug { "$name = ${this._miraiContentToString()}" }
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将内容格式化为较可读的字符串输出.
|
* 将内容格式化为较可读的字符串输出.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user