Files
SunnyLand/main.cpp
T

26 lines
750 B
C++
Raw Normal View History

2025-05-12 15:48:15 +08:00
#include <iostream>
#include <SDL3/SDL.h>
#include <SDL3_image/SDL_image.h>
#include <SDL3_mixer/SDL_mixer.h>
#include <SDL3_ttf/SDL_ttf.h>
#include <glm/glm.hpp>
#include <nlohmann/json.hpp>
#include <spdlog/spdlog.h>
int main(int, char**) {
2025-05-12 16:27:05 +08:00
// 设置日志等级,不设置的话默认为 info
spdlog::set_level(spdlog::level::err);
// 不同等级的log
spdlog::trace("最低级别log!");
spdlog::debug("调试信息!");
2025-05-12 15:48:15 +08:00
spdlog::info("你好,世界!");
2025-05-12 16:27:05 +08:00
spdlog::warn("警告!,很可能会出错");
spdlog::error("程序出错啦!");
spdlog::critical("最高级别的log!, 比error还严重!");
2025-05-12 15:48:15 +08:00
2025-05-12 16:27:05 +08:00
// 格式化输出
spdlog::info("日志格式化输出: {} {} {}", 1, "hello", 3.14);
2025-05-12 15:48:15 +08:00
return 0;
}