apple.korlibs.logger.Logger.darwin.kt Maven / Gradle / Ivy
package korlibs.logger
import kotlinx.cinterop.*
import platform.Foundation.*
import platform.Foundation.NSLog
actual object Console : BaseConsole() {
override fun logInternal(kind: Kind, vararg msg: Any?) {
NSLog("%s", logToString(kind, *msg))
}
override fun logToString(kind: Kind, vararg msg: Any?): String {
return msg.joinToString(", ")
}
}
actual object DefaultLogOutput : Logger.Output {
override fun output(logger: Logger, level: Logger.Level, msg: Any?) = Logger.ConsoleLogOutput.output(logger, level, msg)
}
internal actual val miniEnvironmentVariables: Map by lazy {
autoreleasepool { NSProcessInfo.processInfo.environment.map { it.key.toString() to it.value.toString() }.toMap() }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy