Application 构造时 Logger::Initialize(APP logger:stderr 彩色 + HelloVulkan.log 双写,warn 以上立即 flush),析构 Shutdown。
30 lines
633 B
C++
30 lines
633 B
C++
//
|
|
// Created by atdunbg on 2026/9/20.
|
|
//
|
|
|
|
#ifndef HELLOVULKAN_LOG_H
|
|
#define HELLOVULKAN_LOG_H
|
|
|
|
#pragma once
|
|
|
|
#include <spdlog/spdlog.h>
|
|
|
|
namespace Engine {
|
|
|
|
namespace Logger
|
|
{
|
|
void Initialize();
|
|
void Shutdown();
|
|
}
|
|
|
|
#define ENGINE_TRACE(...) ::spdlog::trace(__VA_ARGS__)
|
|
#define ENGINE_INFO(...) ::spdlog::info(__VA_ARGS__)
|
|
#define ENGINE_DEBUG(...) ::spdlog::debug(__VA_ARGS__)
|
|
#define ENGINE_WARN(...) ::spdlog::warn(__VA_ARGS__)
|
|
#define ENGINE_ERROR(...) ::spdlog::error(__VA_ARGS__)
|
|
#define ENGINE_FATAL(...) ::spdlog::critical(__VA_ARGS__)
|
|
|
|
} // namespace Engine
|
|
|
|
#endif //HELLOVULKAN_LOG_H
|