72BSONCXX_PRIVATE_WARNINGS_PUSH();
73BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4251));
74BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4275));
132BSONCXX_PRIVATE_WARNINGS_POP();
200 std::unique_ptr<impl> _impl;
247#include <mongocxx/v1/detail/postlude.hpp>
A polyfill for std::string_view.
Definition string_view.hpp:412
logger_guard(logger_guard &&)=delete
This class is not moveable.
logger(logger &&)=default
Move constructor.
A tag type representing mongoc's default unstructured log handler.
Definition logger.hpp:137
logger_guard & operator=(logger_guard const &)=delete
This class is not copyable.
~logger_guard()
Restore the unstructured log message handler that was active when this guard was constructed.
logger_guard(logger_guard &&)=delete
This class is not moveable.
logger_guard & operator=(logger_guard &&)=delete
This class is not moveable.
logger_guard(logger_guard const &)=delete
This class is not copyable.
logger(logger const &)=default
Copy constructor.
logger & operator=(logger &&)=default
Move assignment operator.
virtual ~logger()
Destructor.
logger()=default
Default constructor.
virtual void operator()(log_level level, bsoncxx::v1::stdx::string_view domain, bsoncxx::v1::stdx::string_view message) noexcept=0
Handle an unstructured log message emitted by mongoc.
logger(logger &&)=default
Move constructor.
logger & operator=(logger const &)=default
Copy assignment operator.
Provides macros to control the set of symbols exported in the ABI.
#define MONGOCXX_ABI_CDECL
Expands to __cdecl when built with MSVC on Windows.
Definition export.hpp:49
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v1 macro guard prelude header.
Declares entities whose ABI stability is guaranteed for documented symbols.
void set_global_logger(log_handler handler)
Set the process-global unstructured log message handler to a custom handler.
log_level
The log level for an unstructured log message.
Definition logger.hpp:37
@ k_debug
MONGOC_LOG_LEVEL_DEBUG.
Definition logger.hpp:43
@ k_warning
MONGOC_LOG_LEVEL_WARNING.
Definition logger.hpp:40
@ k_trace
MONGOC_LOG_LEVEL_TRACE.
Definition logger.hpp:44
@ k_error
MONGOC_LOG_LEVEL_ERROR.
Definition logger.hpp:38
@ k_critical
MONGOC_LOG_LEVEL_CRITICAL.
Definition logger.hpp:39
@ k_message
MONGOC_LOG_LEVEL_MESSAGE.
Definition logger.hpp:41
@ k_info
MONGOC_LOG_LEVEL_INFO.
Definition logger.hpp:42
std::function< void(log_level, bsoncxx::v1::stdx::string_view, bsoncxx::v1::stdx::string_view)> log_handler
The type of an unstructured log message handler.
Definition logger.hpp:69
The top-level namespace within which all mongocxx library entities are declared.
Declares mongocxx::v1::logger.
Provides std::string_view-related polyfills for library API usage.