Logging: Various logging improvements
* Uses PopWait to reduce the amount of busy waiting if there aren't many new logs * Opens the log file as shared on windows, letting other programs read the logs, but not write to them while citra is running * Flushes the logs to disk if a log >= error arrives
This commit is contained in:
parent
9fdc89a456
commit
87bc5266ef
4 changed files with 29 additions and 11 deletions
|
@ -78,11 +78,12 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* Backend that writes to a file passed into the constructor
|
||||
* Backend that writes to a file passed into the constructor. If a log level is error or higher, it
|
||||
* will flush immediately after writing
|
||||
*/
|
||||
class FileBackend : public Backend {
|
||||
public:
|
||||
explicit FileBackend(const std::string& filename) : file(filename, "w") {}
|
||||
explicit FileBackend(const std::string& filename);
|
||||
|
||||
const char* GetName() const override {
|
||||
return "file";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue