mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-03 04:52:14 +01:00
WebSocket debugger: Enabling a log channel turns logging on
Headless turns logging as a whole off without --log, so a channel enabled with log.channel.set still logged nothing, and a client watching the log events saw none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8f3c49fb9d
commit
96e31f8c47
2 files changed
+7
-1
No files matched your search
@@ -20,6 +20,7 @@
|
||||
// keeps its existing numeric 'level' - only this newer API uses level names, for readability).
|
||||
|
||||
#include "Common/Log/LogManager.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Debugger/WebSocket/LogConfigSubscriber.h"
|
||||
#include "Core/Debugger/WebSocket/WebSocketUtils.h"
|
||||
|
||||
@@ -126,6 +127,11 @@ void WebSocketLogChannelSet(DebuggerRequest &req) {
|
||||
g_logManager.SetLogLevel(type, level);
|
||||
if (hasEnabled)
|
||||
g_logManager.SetEnabled(type, enabled);
|
||||
// A channel logs nothing while logging as a whole is off, as it is in headless without --log.
|
||||
if (hasEnabled && enabled && !g_Config.bEnableLogging) {
|
||||
g_Config.bEnableLogging = true;
|
||||
g_Config.DoNotSaveSetting(&g_Config.bEnableLogging);
|
||||
}
|
||||
|
||||
const LogChannel *chan = g_logManager.GetLogChannel(type);
|
||||
JsonWriter &json = req.Respond();
|
||||
|
||||
Reference in new issue
Block a user