Skip to content
Snippets Groups Projects
Commit 30ce9ccc authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

logger: emits debug signal when compiling with MSC

- also adds the signal to the dbus xml in case other clients/platforms
  wish to connect to it in the future

Change-Id: I6d4d85e88e713a7a0ef22ca032653ca5bec188e7
parent b380cbb6
Branches
No related tags found
No related merge requests found
......@@ -1533,5 +1533,17 @@
</tp:docstring>
</arg>
</signal>
<signal name="debugMessageReceived" tp:name-for-bindings="debugMessageReceived">
<tp:added version="5.2.0"/>
<tp:docstring>
Notify clients when debug is outputted.
</tp:docstring>
<arg type="s" name="message">
<tp:docstring>
The formatted message to be output.
</tp:docstring>
</arg>
</signal>
</interface>
</node>
......@@ -265,7 +265,7 @@ Logger::vlog(const int level, const char* file, int line, bool linefeed,
SetConsoleTextAttribute(hConsole, color_header);
#endif
fputs(contextHeader(file, line).c_str(), stderr);
#ifdef RING_UWP
#ifdef _MSC_VER
std::array<char, 4096> tmp;
vsnprintf(tmp.data(), tmp.size(), format, ap);
ring::emitSignal<DRing::DebugSignal::MessageSend>(contextHeader(file, line) + tmp.data());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment