Edoardo Luppi
06/14/2024, 9:20 AM__android_log_print()
in androidNativeMain
.
The function signature is
__android_log_print(prio: <http://kotlin.Int|kotlin.Int>, tag: kotlin.String?, fmt: kotlin.String?, vararg variadicArguments: kotlin.Any?): <http://kotlin.Int|kotlin.Int>
But I don't understand if variadicArguments
expects a Kotlin type, like String
, or if I should convert to the C representation with cstr
Andrey
06/14/2024, 9:44 AMval num = 128736912873
println("println tes")
__android_log_print(ANDROID_LOG_ERROR.convert(), "Konan_main", "__android_log_print test $num")
Edoardo Luppi
06/14/2024, 9:48 AM%s
part isn't even needed after all.Edoardo Luppi
06/14/2024, 9:48 AMEdoardo Luppi
06/14/2024, 9:49 AMKonan_main
strictly necessary?Andrey
06/14/2024, 9:49 AMephemient
06/14/2024, 9:52 AMadb logcat -s MyApp:*
only shows messages logged with tag MyApp
Edoardo Luppi
06/14/2024, 9:53 AMephemient
06/14/2024, 9:54 AMEdoardo Luppi
06/14/2024, 9:55 AMtag
and fmt
parameter accepts a String, not a C string.ephemient
06/14/2024, 9:57 AMnoStringConversion
in the .def
file, and then that doesn't happen automatically. but afaik it doesn't happen automatically for varargs, since they aren't typedephemient
06/14/2024, 9:58 AMEdoardo Luppi
06/14/2024, 9:59 AMEdoardo Luppi
06/14/2024, 9:59 AM