Files
pixelarium/lib/utilities/SpdLogger.hpp
T

26 lines
646 B
C++
Raw Normal View History

2025-03-14 19:32:40 +01:00
#pragma once
2025-03-17 18:50:31 +01:00
#include <spdlog/common.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
#include <memory>
2025-03-14 19:32:40 +01:00
#include "ILog.hpp"
namespace pixelarium::utils::log
{
class SpdLogger : public ILog
{
public:
2025-03-17 18:50:31 +01:00
explicit SpdLogger(const std::string& file_sink, const std::string& name);
void Info(const std::string& msg) override;
void Debug(const std::string& msg) override;
void Warn(const std::string& msg) override;
void Error(const std::string& msg) override;
2025-03-14 19:32:40 +01:00
2025-03-17 18:50:31 +01:00
private:
std::shared_ptr<spdlog::logger> _logger;
std::string _file;
std::string _name;
2025-03-14 19:32:40 +01:00
};
} // namespace pixelarium::utils::log