C++ Server-Side SDK
LaunchDarkly SDK
Public Member Functions | List of all members
launchdarkly::ILogBackend Class Referenceabstract

#include <log_backend.hpp>

Inheritance diagram for launchdarkly::ILogBackend:
Inheritance graph
[legend]

Public Member Functions

virtual bool Enabled (LogLevel level) noexcept=0
 
virtual void Write (LogLevel level, std::string message) noexcept=0
 
 ILogBackend (ILogBackend const &item)=delete
 
 ILogBackend (ILogBackend &&item)=delete
 
ILogBackendoperator= (ILogBackend const &)=delete
 
ILogBackendoperator= (ILogBackend &&)=delete
 

Detailed Description

Interface for logging back-ends.

For a reference implementation refer to console_backend.hpp/cpp.

Member Function Documentation

◆ Enabled()

virtual bool launchdarkly::ILogBackend::Enabled ( LogLevel  level)
pure virtualnoexcept

Check if the specified log level is enabled.

Parameters
levelThe log level to check.
Returns
Returns true if the level is enabled.

Implemented in LogBackendWrapper.

◆ Write()

virtual void launchdarkly::ILogBackend::Write ( LogLevel  level,
std::string  message 
)
pure virtualnoexcept

Write a message to the specified level. This method must be thread safe.

Parameters
levelThe level to write the message to.
messageThe message to write.

Implemented in LogBackendWrapper.


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