s there a way to use like in Android I'm using log...
# kotlin-native
j
s there a way to use like in Android I'm using log.d("TAG", "message") with NSLog? like specifying the type? Debug, error, information, etc?
j
And is there any other Logger from swift that I can use to diferenciate between debug, error, etc? Is os_log working for Kotling MP¿?
k
you can use NSLog
j
I'm seeing that people is using the print, instead.
So I can use NSLog with types?
k
you pass it a format string and variadic arguments
j
Can you provide to me an example?
k
NSLog(aString)
j
That's enough to print, right?
k
yes
j
Thanks .
k
it works the same as calling it from Obj-C/Swift
j
so something like this no?
Copy code
actual class Logger {

    actual fun debug(message: String, formatJson: Boolean) {
        NSLog(message)
    }
    ....
k
yes