MongoDB C++ Driver  mongocxx-3.7.0
Public Member Functions | Protected Member Functions | List of all members
mongocxx::logger Class Referenceabstract

The interface that all user-defined loggers must implement. More...

#include <logger.hpp>

Public Member Functions

virtual void operator() (log_level level, stdx::string_view domain, stdx::string_view message) noexcept=0
 Handles a log message. More...
 

Protected Member Functions

 logger ()
 Default constructor.
 

Detailed Description

The interface that all user-defined loggers must implement.

Member Function Documentation

◆ operator()()

virtual void mongocxx::logger::operator() ( log_level  level,
stdx::string_view  domain,
stdx::string_view  message 
)
pure virtualnoexcept

Handles a log message.

User defined logger implementations may do whatever they wish when this is called, such as log the output to a file or send it to a remote server for analysis.

Parameters
levelThe log level of the current log message
domainThe domain of the current log message, such as 'client'
messageThe text of the current log message.

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