Global logging settings - what it is?


I was reading about “Global logging settings” in Couchbase lite.
What is this exactly? I think, the documentation is not having enough information.
Does this log store in local DB or push to server? What does exactly do the log statement? Does it store errors or any other specifically? can we sync the log to computer?

Can you please advise.


  1. These are logs generated by Couchbase Lite for debugging purposes. There are various “domains” or categories of logs as discussed in the same link which allow you to specify exactly what you want to log. For example “sync” allows you to log all output related to data sync and so on. You can enable them using enableLogging call on CBLManager. Turn them on one at a time to see exactly what is output.
  2. These are local to the device.
  3. For example, on iOS, by default, the logs are output to the Xcode Debug Console output

If you want to redirect this to a file, one option would be to register a callback and write it to a local file

CBLManager.redirectLogging({ (domain, message) in
                    // You can redirect the message to your output file.

You can connect your device and then copy over the output file to your computer (via iTunes or Xcode device browser etc)