diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-05 00:19:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 00:19:59 -0500 |
commit | e10483a8782db9ac4b2d1727b721f20dec4330c3 (patch) | |
tree | e9757f8a9f85f7297a853f942d009b54307393cc /src/common/logging/backend.h | |
parent | acdc770cfbb3001818ded53daf44588b3d5deaa8 (diff) | |
parent | f5f6292810dab70bc9be0fa4d9f37fe2b5544d86 (diff) |
Merge pull request #1441 from CarlKenner/DebuggerLog
logging: Add DebuggerBackend for logging to Visual Studio
Diffstat (limited to 'src/common/logging/backend.h')
-rw-r--r-- | src/common/logging/backend.h | 14 |
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); |