mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
NKAI: visual logger
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "../lib/modding/ModUtility.h"
|
||||
#include "../lib/CHeroHandler.h"
|
||||
#include "../lib/VCMIDirs.h"
|
||||
#include "../lib/logging/VisualLogger.h"
|
||||
#include "CMT.h"
|
||||
|
||||
#ifdef SCRIPTING_ENABLED
|
||||
@@ -427,6 +428,14 @@ void ClientCommandManager::handleCrashCommand()
|
||||
//disaster!
|
||||
}
|
||||
|
||||
void ClientCommandManager::handleVsLog(std::istringstream & singleWordBuffer)
|
||||
{
|
||||
std::string key;
|
||||
singleWordBuffer >> key;
|
||||
|
||||
logVisual->setKey(key);
|
||||
}
|
||||
|
||||
void ClientCommandManager::printCommandMessage(const std::string &commandMessage, ELogLevel::ELogLevel messageType)
|
||||
{
|
||||
switch(messageType)
|
||||
@@ -546,6 +555,9 @@ void ClientCommandManager::processCommand(const std::string & message, bool call
|
||||
else if(commandName == "crash")
|
||||
handleCrashCommand();
|
||||
|
||||
else if(commandName == "vslog")
|
||||
handleVsLog(singleWordBuffer);
|
||||
|
||||
else
|
||||
{
|
||||
if (!commandName.empty() && !vstd::iswithin(commandName[0], 0, ' ')) // filter-out debugger/IDE noise
|
||||
|
||||
Reference in New Issue
Block a user