C++ Server-Side SDK
LaunchDarkly SDK
log_backend_wrapper.hpp
1 #pragma once
2 
4 #include <launchdarkly/logging/log_backend.hpp>
10  public:
11  explicit LogBackendWrapper(LDLogBackend backend) : backend_(backend) {}
12  bool Enabled(launchdarkly::LogLevel level) noexcept override {
13  return backend_.Enabled(static_cast<LDLogLevel>(level),
14  backend_.UserData);
15  }
16  void Write(launchdarkly::LogLevel level,
17  std::string message) noexcept override {
18  return backend_.Write(static_cast<LDLogLevel>(level), message.c_str(),
19  backend_.UserData);
20  }
21 
22  private:
23  LDLogBackend backend_;
24 };
Definition: log_backend_wrapper.hpp:9
void Write(launchdarkly::LogLevel level, std::string message) noexcept override
Definition: log_backend_wrapper.hpp:16
bool Enabled(launchdarkly::LogLevel level) noexcept override
Definition: log_backend_wrapper.hpp:12
Definition: log_backend.hpp:15
LDLogLevel
Definition: log_level.h:22
Definition: logging_builder.h:30
void * UserData
Definition: logging_builder.h:49
WriteFn Write
Definition: logging_builder.h:44
EnabledFn Enabled
Definition: logging_builder.h:36