Implement new log category for RealmLogger

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      The new improved logging for Realm allows fine-grain log level definition per category. These categories are defined in a tree-like hierarchy, and behave cascading style, setting the level to a top category would change all its leaves.

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

      Unable to find source-code formatter for language: kotlin. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      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.

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

              Assignee:
              Clemente Tort
              Reporter:
              Clemente Tort
              Archiver:
              Marc Greenfield

                Created:
                Updated:
                Archived: