mirror of
https://github.com/open-goal/jak-project
synced 2026-07-07 14:13:45 -04:00
Replace printf logging with spdlog equivalent
Preserve previous printfs in comments for now. Spdlog needs to be configured to be thread-safe. Few additional printfs to convert later. No changes have been made to GOAL's internal printing system
This commit is contained in:
+9
-4
@@ -8,13 +8,18 @@
|
||||
#include "third-party/spdlog/include/spdlog/spdlog.h"
|
||||
#include "third-party/spdlog/include/spdlog/sinks/basic_file_sink.h"
|
||||
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
while (true) {
|
||||
// run the runtime in a loop so we can reset the game and have it restart cleanly
|
||||
printf("gk %d.%d\n", versions::GOAL_VERSION_MAJOR, versions::GOAL_VERSION_MINOR);
|
||||
|
||||
spdlog::set_level(spdlog::level::debug);
|
||||
spdlog::info("spdlog initialized");
|
||||
spdlog::error("test error", 1);
|
||||
spdlog::debug("This is a debug-only message");
|
||||
// run the runtime in a loop so we can reset the game and have it restart cleanly
|
||||
//printf("gk %d.%d\n", versions::GOAL_VERSION_MAJOR, versions::GOAL_VERSION_MINOR);
|
||||
spdlog::debug("gk {}.{} OK!\n", versions::GOAL_VERSION_MAJOR, versions::GOAL_VERSION_MINOR);
|
||||
|
||||
|
||||
if (exec_runtime(argc, argv) == 2) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user