Skip to content

Commit 4b845b6

Browse files
committed
fix: fix sinks in main.cpp:
- set application name for android logger - use color sink for normal console stdout output
1 parent b3a4890 commit 4b845b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/executables/game/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#include <spdlog/sinks/basic_file_sink.h>
3838
#include <spdlog/sinks/rotating_file_sink.h>
39-
#include <spdlog/sinks/stdout_sinks.h>
39+
#include <spdlog/sinks/stdout_color_sinks.h>
4040
#include <spdlog/spdlog.h>
4141

4242
#if defined(_MSC_VER)
@@ -49,13 +49,13 @@ namespace {
4949

5050
std::vector<spdlog::sink_ptr> sinks;
5151
#if defined(__ANDROID__)
52-
sinks.push_back(std::make_shared<spdlog::sinks::android_sink_mt>());
52+
sinks.push_back(std::make_shared<spdlog::sinks::android_sink_mt>(constants::program_name.c_str()));
5353
#elif defined(__CONSOLE__)
5454
sinks.push_back(std::make_shared<console::debug_sink_mt>());
5555
#elif defined(__EMSCRIPTEN__)
5656
sinks.push_back(web::get_console_sink());
5757
#else
58-
sinks.push_back(std::make_shared<spdlog::sinks::stdout_sink_mt>());
58+
sinks.push_back(std::make_shared<spdlog::sinks::stdout_color_sink_mt>(spdlog::color_mode::automatic));
5959
#endif
6060

6161

0 commit comments

Comments
 (0)