Class Log


  • public final class Log
    extends java.lang.Object
    Gets the log controller for Couchbase Lite, which stores the three available logging methods: console (logcat), file, and custom.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ConsoleLogger getConsole()
      Gets the logger that writes to the system console
      Logger getCustom()
      Gets the custom logger that was registered by the application (if any)
      FileLogger getFile()
      Gets the logger that writes to log files
      void setCustom​(Logger customLogger)
      Sets an application specific logging method
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getConsole

        @NonNull
        public ConsoleLogger getConsole()
        Gets the logger that writes to the system console
        Returns:
        The logger that writes to the system console
      • getFile

        @NonNull
        public FileLogger getFile()
        Gets the logger that writes to log files
        Returns:
        The logger that writes to log files
      • getCustom

        @Nullable
        public Logger getCustom()
        Gets the custom logger that was registered by the application (if any)
        Returns:
        The custom logger that was registered by the application, or null.
      • setCustom

        public void setCustom​(Logger customLogger)
        Sets an application specific logging method
        Parameters:
        customLogger - A Logger implementation that will receive logging messages