Repo created
This commit is contained in:
parent
81b91f4139
commit
f8c34fa5ee
22732 changed files with 4815320 additions and 2 deletions
31
TMessagesProj/jni/voip/tgcalls/LogSinkImpl.h
Normal file
31
TMessagesProj/jni/voip/tgcalls/LogSinkImpl.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#ifndef TGCALLS_LOG_SINK_IMPL_H
|
||||
#define TGCALLS_LOG_SINK_IMPL_H
|
||||
|
||||
#include "rtc_base/logging.h"
|
||||
#include <fstream>
|
||||
|
||||
namespace tgcalls {
|
||||
|
||||
struct FilePath;
|
||||
|
||||
class LogSinkImpl final : public rtc::LogSink {
|
||||
public:
|
||||
LogSinkImpl(const FilePath &logPath);
|
||||
|
||||
void OnLogMessage(const std::string &msg, rtc::LoggingSeverity severity, const char *tag) override;
|
||||
void OnLogMessage(const std::string &message, rtc::LoggingSeverity severity) override;
|
||||
void OnLogMessage(const std::string &message) override;
|
||||
|
||||
std::string result() const {
|
||||
return _data.str();
|
||||
}
|
||||
|
||||
private:
|
||||
std::ofstream _file;
|
||||
std::ostringstream _data;
|
||||
|
||||
};
|
||||
|
||||
} // namespace tgcalls
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue