1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-05 23:28:14 +02:00

Show human-readable thread name in log

This commit is contained in:
Ivan Savenko
2024-02-11 16:11:21 +02:00
parent 0fc0ad238b
commit cded8b1999
6 changed files with 44 additions and 13 deletions

View File

@@ -189,6 +189,7 @@ int main(int argc, char * argv[])
console->start();
#endif
setThreadNameLoggingOnly("MainGUI");
const boost::filesystem::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Client_log.txt";
logConfig = new CBasicLogConfigurator(logPath, console);
logConfig->configureDefault();
@@ -397,7 +398,10 @@ void playIntro()
static void mainLoop()
{
#ifndef VCMI_UNIX
// on Linux, name of main thread is also name of our process. Which we don't want to change
setThreadName("MainGUI");
#endif
while(1) //main SDL events loop
{