Francis Mariano
10/04/2021, 7:24 PMtravis
10/04/2021, 7:26 PMiosMain
(or similar) sourceset?Francis Mariano
10/04/2021, 7:33 PMfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
Log.dispatcher.install(AppleSystemLogger) // ????????
return true
}
Or should I inject the Logger via Koin?Cedrick Cooke
10/04/2021, 7:39 PMfun configureLogging()
that includes Log.dispatcher.install(AppleSystemLogger)
, and call that function from Swift. That way you don't have to worry about any real types crossing the language boundary.Francis Mariano
10/04/2021, 8:01 PMfun configureLogging()
seems work fine.
So far I have the following impressions when using the logging from common code: If I call fun configureLogging()
the Xcode console display for me the following:
2021-10-04 16:52:52.587775-0300 Test-logging[760:161750] D/Unknown: Repository:init
Otherwise, the console does not log anything.travis
10/04/2021, 8:43 PMOtherwise, the console does not log anything.Are you saying that other log calls in common code (e.g.
<http://Log.info|Log.info> { .. }
) aren't working?Francis Mariano
10/04/2021, 9:15 PMfun configureLogging()
, log calls in commom code are not working.Cedrick Cooke
10/04/2021, 9:17 PMLog.dispatcher.install(
on every platform you target.<http://Log.info|Log.info>
to be optimized away if a library using Tuulbox has a consumer that doesn't want logging.Francis Mariano
10/04/2021, 9:23 PMIf no Logger is installed, then log blocks are not called at runtime.
Cedrick Cooke
10/04/2021, 9:24 PMFrancis Mariano
10/04/2021, 9:30 PMCedrick Cooke
10/04/2021, 9:50 PM