You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I'm getting the instance of my logger with a custom tag by injecting with @InjectedParam
@Factory
fungetLoggerWithTag(
@InjectedParam tag:String?,
loggerConfig:LoggerConfig,
) =Logger(
config = loggerConfig,
tag = tag ?:"Shared",
)
@Single
internalclassMySingleClass : KoinComponent {
// setting the tag of my logger with the parameter capabilitiesval logger:Logger= get(parameters = { parameterSetOf("MySingleClass") })
}
As I can't use Koin API in the constructor, I need to declare an extra property to manage the logger parameters.
It is possible to avoid the first case? And doing something like the following example?
It will be easier to set default values or override them.
Hi,
Better explaining with an example
Currently, I'm getting the instance of my logger with a custom tag by injecting with
@InjectedParam
As I can't use Koin API in the constructor, I need to declare an extra property to manage the logger parameters.
It is possible to avoid the first case? And doing something like the following example?
It will be easier to set default values or override them.
Thanks!
The text was updated successfully, but these errors were encountered: