From f5f6292810dab70bc9be0fa4d9f37fe2b5544d86 Mon Sep 17 00:00:00 2001 From: Carl Kenner Date: Fri, 5 Oct 2018 12:52:49 +0930 Subject: logging: Add DebuggerBackend for logging to Visual Studio --- src/common/logging/backend.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/common/logging/backend.h') 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); void RemoveBackend(std::string_view backend_name); -- cgit v1.2.3