https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

Diego

01/18/2019, 12:53 PM
Hello guys. I’m working on a multiplaform project, iOS and JVM (I’m not targeting Android directly). Depending on the build type (debug or release) I want to configure the logging level (i.e. to print only errors in release). Since there is no a
BuildConfig
class avaialble, how can I know from
commonMain
the build type?
l

louiscad

01/18/2019, 6:26 PM
You need to find another way, like allowing to set the log level from the host app, or have an additional artifact for debug, similar to how it's done for kotlinx.coroutines
d

Diego

01/19/2019, 7:45 PM
Ok, thanks for your answer! 🙂
3 Views