Files
pixelarium/lib/utilities/SpdLogger.hpp
T
Kueffner, Maximilian 68cc9d1853 default logger init
2025-03-17 18:50:31 +01:00

26 lines
646 B
C++

#pragma once
#include <spdlog/common.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
#include <memory>
#include "ILog.hpp"
namespace pixelarium::utils::log
{
class SpdLogger : public ILog
{
public:
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;
private:
std::shared_ptr<spdlog::logger> _logger;
std::string _file;
std::string _name;
};
} // namespace pixelarium::utils::log