Source release 18.1.0
This commit is contained in:
28
cdm/include/stderr_logger.h
Normal file
28
cdm/include/stderr_logger.h
Normal file
@@ -0,0 +1,28 @@
|
||||
// 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 <iostream>
|
||||
#include <string>
|
||||
|
||||
#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_
|
||||
Reference in New Issue
Block a user