Skip to content

Commit 9baff81

Browse files
MalkierianKiritoDv
authored andcommitted
Add logging for versioning on startup.
Change default debug-mode log level to debug.
1 parent f739dd5 commit 9baff81

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/port/Engine.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ extern "C" {
6363
#include "audio/external.h"
6464
#include "audio/internal.h"
6565
#include "game/ingame_menu.h"
66+
#include "variables.h"
6667
bool prevAltAssets = false;
6768
}
6869

@@ -136,14 +137,16 @@ GameEngine::GameEngine() : dictionary(nullptr) {
136137
this->context->InitConsole();
137138

138139
#if (_DEBUG)
139-
auto defaultLogLevel = spdlog::level::trace;
140+
auto defaultLogLevel = spdlog::level::debug;
140141
#else
141142
auto defaultLogLevel = spdlog::level::info;
142143
#endif
143144
auto logLevel =
144145
static_cast<spdlog::level::level_enum>(CVarGetInteger(CVAR_DEVELOPER_TOOLS("LogLevel"), defaultLogLevel));
145146
context->InitLogging(logLevel, logLevel);
146147
Ship::Context::GetInstance()->GetLogger()->set_pattern("[%H:%M:%S.%e] [%s:%#] [%l] %v");
148+
SPDLOG_INFO("Starting Ghostship version {} (Branch: {} | Commit: {})", (char*)gBuildVersion, (char*)gGitBranch,
149+
(char*)gGitCommitHash);
147150

148151
gsFast3dWindow = std::make_shared<Fast::Fast3dWindow>(std::vector<std::shared_ptr<Ship::GuiWindow>>({}));
149152
this->context->InitWindow(gsFast3dWindow);

src/port/ui/GhostshipMenuDevTools.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static const std::unordered_map<int32_t, const char*> language = {
2424
};
2525

2626
#ifdef _DEBUG
27-
DebugLogOption defaultLogLevel = DEBUG_LOG_TRACE;
27+
DebugLogOption defaultLogLevel = DEBUG_LOG_DEBUG;
2828
#else
2929
DebugLogOption defaultLogLevel = DEBUG_LOG_INFO;
3030
#endif

0 commit comments

Comments
 (0)