Merge cdc_stream into asset_stream_manager (#26)

Adds start and stop commands to asset_stream_manager.
asset_stream_manager will be renamed to cdc_stream next.
This commit is contained in:
Lutz Justen
2022-12-01 12:40:00 +01:00
committed by GitHub
parent 876e59409f
commit f0539226a2
23 changed files with 507 additions and 281 deletions

View File

@@ -123,6 +123,13 @@ class ConsoleLog : public Log {
absl::Mutex mutex_;
};
// Initializes the log in the constructor and shuts it down on destruction.
class ScopedLog {
public:
ScopedLog(std::unique_ptr<Log> log) { Log::Initialize(std::move(log)); }
~ScopedLog() { Log::Shutdown(); }
};
class FileLog : public Log {
public:
FileLog(LogLevel log_level, const char* path);