c00c2c71ac
* scratch adding histogram to image views Histograms should come from some sort of histogram service. This is currently just a POC. * custom logger implementation w/o spdlog * missing cmake file * fix tests * use operator<< over direct stream exposure * rm print header * add threading test + refactor towards interface libraries omits the need for =target_include_directories= calls /everywhere/ * rm print header * rm constexpr * templated thread_pool * fix doxyfile * default enable doc building * czi reader refactor * rm erroneous include expression * clang-format * single lib include with PUBLIC visibility * compile imgui stdlib * clang format * documentation update centralize `LogLevelToString` to `ILog.hpp` update docs and examples
30 lines
815 B
C++
30 lines
815 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
|
|
{
|
|
/// @brief Implements ILog using the spdlog library
|
|
/// see https://github.com/gabime/spdlog
|
|
class SpdLogger : public ILog
|
|
{
|
|
public:
|
|
explicit SpdLogger(const std::string& file_sink, const std::string& name);
|
|
|
|
void Info(const std::string& msg) const override;
|
|
void Debug(const std::string& msg) const override;
|
|
void Warn(const std::string& msg) const override;
|
|
void Error(const std::string& msg) const override;
|
|
void ChangeLevel(LogLevel lvl) const override;
|
|
|
|
private:
|
|
std::shared_ptr<spdlog::logger> logger_;
|
|
std::string file_;
|
|
std::string name_;
|
|
};
|
|
} // namespace pixelarium::utils::log
|