Description
The current implementation of StitchRoomConfig uses simple lambdas for properties like logger. While functional, this lacks the structure needed for advanced logging (e.g., tags, levels) and makes it harder to provide default implementations that integrate with platform-specific logging.
Proposed Improvement
Introduce a StitchLogger interface and update StitchRoomConfig to use it.
interface StitchLogger {
fun log(message: String, tag: String? = null)
}
class StitchRoomConfig<T : RoomDatabase> {
var logger: StitchLogger = DefaultStitchLogger()
}
Goals
- Define a structured
StitchLogger interface.
- Provide a default console-based implementation.
- Update
StitchRoomConfig to use the new interface.
Description
The current implementation of
StitchRoomConfiguses simple lambdas for properties likelogger. While functional, this lacks the structure needed for advanced logging (e.g., tags, levels) and makes it harder to provide default implementations that integrate with platform-specific logging.Proposed Improvement
Introduce a
StitchLoggerinterface and updateStitchRoomConfigto use it.Goals
StitchLoggerinterface.StitchRoomConfigto use the new interface.