aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Server/ServerLogger.h
diff options
context:
space:
mode:
authorqwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com>2026-03-16 21:44:26 -0500
committerGitHub <noreply@github.com>2026-03-16 21:44:26 -0500
commitce739f6045ec72127491286ea3f3f21e537c1b55 (patch)
treef33bd42a47c1b4a7b2153a7fb77127ee3b407db9 /Minecraft.Server/ServerLogger.h
parent255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff)
parent5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Server/ServerLogger.h')
-rw-r--r--Minecraft.Server/ServerLogger.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/Minecraft.Server/ServerLogger.h b/Minecraft.Server/ServerLogger.h
new file mode 100644
index 00000000..89b820e6
--- /dev/null
+++ b/Minecraft.Server/ServerLogger.h
@@ -0,0 +1,44 @@
+#pragma once
+
+#include <string>
+
+namespace ServerRuntime
+{
+ enum EServerLogLevel
+ {
+ eServerLogLevel_Debug = 0,
+ eServerLogLevel_Info = 1,
+ eServerLogLevel_Warn = 2,
+ eServerLogLevel_Error = 3
+ };
+
+ /**
+ * **Parse Log Level String**
+ *
+ * Converts a string value into log level (`debug`/`info`/`warn`/`error`)
+ * ログレベル文字列の変換処理
+ *
+ * @param value Source string
+ * @param outLevel Output location for parsed level
+ * @return `true` when conversion succeeds
+ */
+ bool TryParseServerLogLevel(const char *value, EServerLogLevel *outLevel);
+
+ void SetServerLogLevel(EServerLogLevel level);
+ EServerLogLevel GetServerLogLevel();
+
+ void LogDebug(const char *category, const char *message);
+ void LogInfo(const char *category, const char *message);
+ void LogWarn(const char *category, const char *message);
+ void LogError(const char *category, const char *message);
+
+ /** Emit formatted log output with the specified level and category */
+ void LogDebugf(const char *category, const char *format, ...);
+ void LogInfof(const char *category, const char *format, ...);
+ void LogWarnf(const char *category, const char *format, ...);
+ void LogErrorf(const char *category, const char *format, ...);
+
+ void LogStartupStep(const char *message);
+ void LogWorldIO(const char *message);
+ void LogWorldName(const char *prefix, const std::wstring &name);
+}