// Copyright 2023 Google LLC. All Rights Reserved. This file and proprietary // source code may only be used and distributed under the Widevine License // Agreement. // // You can use this implementation of ILogger when calling Cdm::initialize() in // order to log all messages to stderr. This preserves the behavior of past CE // CDM releases. #ifndef WVCDM_CDM_STDERR_LOGGER_H_ #define WVCDM_CDM_STDERR_LOGGER_H_ #include #include #include "cdm.h" namespace widevine { class StderrLogger : public Cdm::ILogger { public: StderrLogger() {} ~StderrLogger() override {} void log(const std::string& message) override { std::cerr << message << std::endl << std::flush; } }; } // namespace widevine #endif // WVCDM_CDM_STDERR_LOGGER_H_