Fix logging to files

This commit is contained in:
Robbert van der Helm
2020-03-07 18:58:23 +01:00
parent 50172aefbb
commit e5348fc5f7
2 changed files with 12 additions and 13 deletions
+3 -2
View File
@@ -16,6 +16,7 @@
#pragma once
#include <memory>
#include <ostream>
/**
@@ -63,7 +64,7 @@ class Logger {
* @param prefix An optional prefix for the logger. Useful for differentiate
* messages coming from the Wine VST host.
*/
Logger(std::ostream&& stream,
Logger(std::shared_ptr<std::ostream> stream,
Verbosity verbosity_level,
std::string prefix = "");
@@ -92,7 +93,7 @@ class Logger {
* The output stream to write the log messages to. Typically either STDERR
* or a file stream.
*/
std::ostream& stream;
std::shared_ptr<std::ostream> stream;
/**
* The verbosity level of this logger instance. Based on this certain
* messages may or may not be shown.