From 3a5ac14e59b4480f50d9cbe5216ab9327a8bd55f Mon Sep 17 00:00:00 2001 From: TheoryOfNekomata Date: Sat, 11 Feb 2023 04:42:17 +0800 Subject: [PATCH] Update game logging Intercept WS messages for consistent logs like in the server. --- src/packages/game/IZ_app.c | 2 ++ src/packages/game/IZ_app.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/packages/game/IZ_app.c b/src/packages/game/IZ_app.c index 7fad1c8..fbba02e 100644 --- a/src/packages/game/IZ_app.c +++ b/src/packages/game/IZ_app.c @@ -26,6 +26,8 @@ typedef enum { } IZ_AppInitializeResult; IZ_AppInitializeResult IZ_AppInitialize(struct IZ_App* app, u8 argc, const char* argv[]) { + IZ_LogInterceptWSMessages(LLL_USER | LLL_ERR | LLL_WARN | LLL_NOTICE); + IZ_LogInfo(IZ_LOG_CATEGORY_GLOBAL, "Starting %s...", IZ_APP_NAME); IZ_memset(app, 0, sizeof(struct IZ_App)); diff --git a/src/packages/game/IZ_app.h b/src/packages/game/IZ_app.h index cca9caf..6fe1251 100644 --- a/src/packages/game/IZ_app.h +++ b/src/packages/game/IZ_app.h @@ -10,6 +10,7 @@ #include "IZ_app_net.h" #include "IZ_app_video.h" #include "../log/IZ_log.h" +#include "../log/IZ_intercept.h" #include "../string/IZ_string.h" #include "../timer/IZ_timer.h"