summaryrefslogtreecommitdiff
path: root/src/common/logging/backend.h
diff options
context:
space:
mode:
authorCarl Kenner <carl.kenner@gmail.com>2018-10-05 12:52:49 +0930
committerCarl Kenner <carl.kenner@gmail.com>2018-10-07 13:24:04 +1030
commitf5f6292810dab70bc9be0fa4d9f37fe2b5544d86 (patch)
tree1ec449a6d6e33a36a3133de2196954a6967af9ad /src/common/logging/backend.h
parente92251795a951903e93c36b981c45906c01b2712 (diff)
logging: Add DebuggerBackend for logging to Visual Studio
Diffstat (limited to 'src/common/logging/backend.h')
-rw-r--r--src/common/logging/backend.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/common/logging/backend.h b/src/common/logging/backend.h
index 11edbf1b6..91bb0c309 100644
--- a/src/common/logging/backend.h
+++ b/src/common/logging/backend.h
@@ -103,6 +103,20 @@ private:
std::size_t bytes_written;
};
+/**
+ * Backend that writes to Visual Studio's output window
+ */
+class DebuggerBackend : public Backend {
+public:
+ static const char* Name() {
+ return "debugger";
+ }
+ const char* GetName() const override {
+ return Name();
+ }
+ void Write(const Entry& entry) override;
+};
+
void AddBackend(std::unique_ptr<Backend> backend);
void RemoveBackend(std::string_view backend_name);