realm-kotlin icon indicating copy to clipboard operation
realm-kotlin copied to clipboard

[RKOTLIN-1038] Implement new log category for RealmLogger

Open clementetb opened this issue 11 months ago • 0 comments

closes https://github.com/realm/realm-kotlin/issues/1691

RealmLog would see the current level property deprecated in favor of a setter and getter functions.

RealmLog {
    @Deprecated
    public var level: LogLevel

    public fun setLevel(level: LogLevel, category: LogCategory)
    public fun getLevel(category: LogCategory): LogLevel
}

The custom logger interface also gets modified adding a new method that has the category in its signature. Backward compatibility would be ensured to the current deprecated methods.

RealmLogger {
    public fun log(
        category: LogCategory, 
        level: LogLevel, 
        throwable: Throwable?, 
        message: String?, 
        vararg args: Any?
    )
}

clementetb avatar Mar 15 '24 12:03 clementetb