do { \
} while ( false )
CBL_CORE_API bool c4log_willLog(C4LogDomain, C4LogLevel)
Returns true if logging to this domain at this level will have an effect.
CBL_CORE_API void c4log(C4LogDomain domain, C4LogLevel level, const char *fmt,...) __printflike(3
Logs a message/warning/error to a specific domain, if its current level is less than or equal to the ...
◆ C4LogVerbose ◆ C4Warn ◆ C4WarnError ◆ C4LogCallbackA logging callback that the application can register.
◆ C4LogDomainReference to a log domain: a specific source of logs that can be enabled or disabled.
◆ C4LogLevel Enumerator kC4LogDebug kC4LogVerboseSuper-verbose messages that are only enabled in debug builds of LiteCore.
kC4LogInfoMore info than you normally want.
kC4LogWarningInformational messages.
kC4LogErrorWarnings about something unusual that might be a problem.
kC4LogNoneErrors that occur; these might be handled internally.
Setting this level will disable logging entirely
◆ c4log()Logs a message/warning/error to a specific domain, if its current level is less than or equal to the given level.
This message will then be written to the current callback and/or binary file, if their levels are less than or equal to the given level.
Returns the minimum level of log messages to be written to the log file, regardless of what level individual log domains are set to.
◆ c4log_binaryFilePath()Returns the filesystem path of the directory where log files are kept.
◆ c4log_callbackLevel()Returns the minimum level of log messages to be reported via callback, regardless of what level individual log domains are set to.
◆ c4log_enableFatalExceptionBacktrace() CBL_CORE_API void c4log_enableFatalExceptionBacktrace ( void )Registers a handler with the C++ runtime that will log a backtrace when an uncaught C++ exception occurs, just before the process aborts.
◆ c4log_flushLogFiles()Ensures all log messages have been written to the current log files.
◆ c4log_getCallback()Returns the current logging callback, or the default one if none has been set.
◆ c4log_getDomain()Looks up a named log domain.
Returns the name of a log domain.
(The default domain's name is an empty string.)
◆ c4log_getLevel()Returns the current log level of a domain, the minimum level of message it will log.
◆ c4log_getWarnOnErrors() ◆ c4log_setBinaryFileLevel()Sets the minimum level of log messages to be written to the log file.
◆ c4log_setCallbackLevel()Sets the minimum level of log messages to be reported via callback.
◆ c4log_setLevel()Changes the level of the given log domain.
This setting is global to the entire process. Logging is further limited by the levels assigned to the current callback and/or binary file. For example, if you set the Foo domain's level to Verbose, and the current log callback is at level Warning while the binary file is at Verbose, then verbose Foo log messages will be written to the file but not to the callback.
◆ c4log_warnOnErrors()If set to true, LiteCore will log a warning of the form "LiteCore throwing %s error %d: %s" just before throwing an internal exception.
This can be a good way to catch the source where an error occurs.
◆ c4log_willLog()Returns true if logging to this domain at this level will have an effect.
This is called by the C4Log macros (below), to skip the possibly-expensive evaluation of parameters if nothing will be logged anyway. (This is not the same as comparing c4log_getLevel, because even if the domain's level indicates it would log, logging could still be suppressed by the global callbackLevel or binaryFileLevel.)
◆ c4log_writeToBinaryFile()Causes log messages to be written to a file, overwriting any previous contents.
The data is written in an efficient and compact binary form that can be read using the "litecorelog" tool.
Registers (or unregisters) a log callback, and sets the minimum log level to report.
Before this is called, a default callback is used that writes to stderr at the Info level. NOTE: this setting is global to the entire process.
fmt
parameter will be the actual string to log, and the args
parameter will be NULL.
Same as c4log, except it accepts preformatted messages as FLSlices.
◆ c4vlog()Same as c4log, for use in calling functions that already take variable args.
◆ kC4DatabaseLogLog domain for database operations.
◆ kC4DefaultLogSubsystems that produce logs.
Log levels can be configured for each, so you can focus your diagnostic efforts on the area of interest. The default log domain
◆ kC4QueryLogLog domain for query operations.
◆ kC4SyncLogLog domain for replication operations.
◆ kC4WebSocketLogLog domain for WebSocket operations.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4