Couchbase Lite C++
Couchbase Lite C++ API
Loading...
Searching...
No Matches
cbl::LogSinks Class Reference

Controls where Couchbase Lite writes its log messages. More...

#include <cbl++/LogSinks.hh>

Static Public Member Functions

static void setConsole (const ConsoleLogSink &sink)
 Sets the console log sink.
static ConsoleLogSink console ()
 Returns the current console log sink.
static void setCustom (const CustomLogSink &sink)
 Sets the custom log sink, whose callback receives each log message.
static CustomLogSink custom ()
 Returns the current custom log sink.
static void setFile (FileLogSink sink)
 Sets the file log sink, which writes log messages to files in a directory.
static FileLogSink file ()
 Returns the current file log sink.

Detailed Description

Controls where Couchbase Lite writes its log messages.

There are three independent sinks — console, custom (a user callback), and file — each configured separately. Disable a sink by setting its log level to kCBLLogNone.

Member Function Documentation

◆ console()

ConsoleLogSink cbl::LogSinks::console ( )
inlinestatic

Returns the current console log sink.

It is enabled at the warning level for all domains by default.

◆ custom()

CustomLogSink cbl::LogSinks::custom ( )
inlinestatic

Returns the current custom log sink.

It is disabled by default.

◆ file()

FileLogSink cbl::LogSinks::file ( )
inlinestatic

Returns the current file log sink.

It is disabled by default.

◆ setConsole()

void cbl::LogSinks::setConsole ( const ConsoleLogSink & sink)
inlinestatic

Sets the console log sink.

To disable it, set the sink's log level to kCBLLogNone.

Parameters
sinkThe console log sink configuration.

◆ setCustom()

void cbl::LogSinks::setCustom ( const CustomLogSink & sink)
inlinestatic

Sets the custom log sink, whose callback receives each log message.

To disable it, set the sink's log level to kCBLLogNone.

Parameters
sinkThe custom log sink configuration.

◆ setFile()

void cbl::LogSinks::setFile ( FileLogSink sink)
inlinestatic

Sets the file log sink, which writes log messages to files in a directory.

To disable it, set the sink's log level to kCBLLogNone.

Parameters
sinkThe file log sink configuration.

The documentation for this class was generated from the following file: