Commit b62889ae authored by dsq's avatar dsq

oh_log_printMsg->oh_log_print

parent 99cfb477
...@@ -5,6 +5,7 @@ import kotlinx.coroutines.DelicateCoroutinesApi ...@@ -5,6 +5,7 @@ import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import platform.PerformanceAnalysisKit.HiLog.OH_LOG_PrintMsg import platform.PerformanceAnalysisKit.HiLog.OH_LOG_PrintMsg
import platform.ohos.OH_LOG_Print
@OptIn(DelicateCoroutinesApi::class) @OptIn(DelicateCoroutinesApi::class)
actual fun startLog( actual fun startLog(
...@@ -83,7 +84,7 @@ private fun getTimeMillis(): Long { ...@@ -83,7 +84,7 @@ private fun getTimeMillis(): Long {
@CName("hiLogPrintMsg") @CName("hiLogPrintMsg")
fun hiLogPrintMsg(type: UInt, level: UInt, domain: UInt, tag: String, message: String): Int { fun hiLogPrintMsg(type: UInt, level: UInt, domain: UInt, tag: String, message: String): Int {
return try { return try {
OH_LOG_PrintMsg(type, level, domain, tag, message) OH_LOG_Print(type, level, domain, tag, message)
} catch (_: Throwable) { } catch (_: Throwable) {
-1 -1
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment