From 08384346bf925ba4b5df389bd68254913f91b6c4 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 13 May 2023 14:04:13 +0200 Subject: [PATCH] Setup log callback sink for netconsole --- r5dev/core/dllmain.cpp | 2 +- r5dev/netconsole/netconsole.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/r5dev/core/dllmain.cpp b/r5dev/core/dllmain.cpp index 26e9577e..44e542ab 100644 --- a/r5dev/core/dllmain.cpp +++ b/r5dev/core/dllmain.cpp @@ -44,7 +44,7 @@ void Tier0_Init() #endif // !DEDICATED // Setup logger callback sink. - g_CoreMsgVCallback = EngineLoggerSink; + g_CoreMsgVCallback = &EngineLoggerSink; // Setup crash callback. g_CrashHandler->SetCrashCallback(&Crash_Callback); diff --git a/r5dev/netconsole/netconsole.cpp b/r5dev/netconsole/netconsole.cpp index 3da4fa80..07b36be0 100644 --- a/r5dev/netconsole/netconsole.cpp +++ b/r5dev/netconsole/netconsole.cpp @@ -6,6 +6,7 @@ #include "core/stdafx.h" #include "core/logdef.h" +#include "core/logger.h" #include "tier0/utility.h" #include "tier1/NetAdr.h" #include "tier2/socketcreator.h" @@ -40,6 +41,8 @@ CNetCon::~CNetCon(void) //----------------------------------------------------------------------------- bool CNetCon::Init(void) { + g_CoreMsgVCallback = &EngineLoggerSink; + WSAData wsaData; const int nError = ::WSAStartup(MAKEWORD(2, 2), &wsaData);