aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/logging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zencore/logging.cpp')
-rw-r--r--src/zencore/logging.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/zencore/logging.cpp b/src/zencore/logging.cpp
index 3206e380b..5ada0cac7 100644
--- a/src/zencore/logging.cpp
+++ b/src/zencore/logging.cpp
@@ -345,7 +345,7 @@ SuppressConsoleLog()
}
SinkPtr NullSinkPtr(new NullSink());
- ConLogger = Ref<Logger>(new Logger("console", std::vector<SinkPtr>{NullSinkPtr}));
+ ConLogger = Ref<Logger>(new Logger("console", NullSinkPtr));
Registry::Instance().Register(ConLogger);
}
@@ -391,7 +391,7 @@ ConsoleLog()
{
SinkPtr ConsoleSink(new AnsiColorStdoutSink());
ConsoleSink->SetFormatter(std::make_unique<ConsoleFormatter>());
- ConLogger = Ref<Logger>(new Logger("console", std::vector<SinkPtr>{ConsoleSink}));
+ ConLogger = Ref<Logger>(new Logger("console", ConsoleSink));
Registry::Instance().Register(ConLogger);
}
});
@@ -414,6 +414,13 @@ InitializeLogging()
{
ZEN_MEMSCOPE(ELLMTag::Logging);
+ EnableVTMode();
+
+#if ZEN_PLATFORM_WINDOWS
+ // Enable UTF-8 output so multi-byte characters render correctly via WriteFile
+ SetConsoleOutputCP(CP_UTF8);
+#endif
+
TheDefaultLogger = LoggerRef(*Registry::Instance().DefaultLoggerRaw());
g_LoggingInitialized = true;
}