Couchbase Lite C
Couchbase Lite C API
Loading...
Searching...
No Matches
Logging

Managing messages that Couchbase Lite logs at runtime. More...

Functions

void CBL_Log (CBLLogDomain domain, CBLLogLevel level, const char *format,...) __printflike(3
 Formats and writes a message to the log, in the given domain at the given level.
void void CBL_LogMessage (CBLLogDomain domain, CBLLogLevel level, FLSlice message)
 Writes a pre-formatted message to the log, exactly as given.

Detailed Description

Managing messages that Couchbase Lite logs at runtime.

Function Documentation

◆ CBL_Log()

void CBL_Log ( CBLLogDomain domain,
CBLLogLevel level,
const char * format,
... )

Formats and writes a message to the log, in the given domain at the given level.

Warning
This function takes a printf-style format string, with extra parameters to match the format placeholders, and has the same security vulnerabilities as other printf-style functions.

If you are logging a fixed string, call CBL_LogMessage instead, otherwise any % characters in the format string will be misinterpreted as placeholders and the dreaded Undefined Behavior will result, possibly including crashes or overwriting the stack.

Parameters
domainThe log domain to associate this message with.
levelThe severity of the message. If this is lower than the current minimum level for the domain (as set by CBLLog_SetConsoleLevel), nothing is logged.
formatA printf-style format string. % characters in this string introduce parameters, and corresponding arguments must follow.
Warning
Deprecated : No alternative for this function and this function will be removed in the future release.

◆ CBL_LogMessage()

void void CBL_LogMessage ( CBLLogDomain domain,
CBLLogLevel level,
FLSlice message )

Writes a pre-formatted message to the log, exactly as given.

Parameters
domainThe log domain to associate this message with.
levelThe severity of the message. If this is lower than the current minimum level for the domain (as set by CBLLog_SetConsoleLevel), nothing is logged.
messageThe exact message to write to the log.
Warning
Deprecated : No alternative for this function and this function will be removed in the future release.