1 #ifndef ASR_UTIL_LOGGER_SPDLOG_H 2 #define ASR_UTIL_LOGGER_SPDLOG_H 7 #include <spdlog/spdlog.h> 37 spdlog::level::level_enum
convert_level(
const std::string& the_level)
const;
46 virtual void set_level(spdlog::sinks::sink& the_sink,
const std::string& the_level);
55 virtual void set_pattern(spdlog::sinks::sink& the_sink,
const std::string& the_pattern);
76 explicit Spdlog(
const Config::Spdlog& the_config, std::shared_ptr<Setters> the_setters = std::make_shared<Setters>());
91 const std::string& the_log_message)
94 std::shared_ptr<spdlog::logger>
logger();
103 #endif // ASR_UTIL_LOGGER_SPDLOG_H Level
ログレベル
Definition: Logger.h:32
std::shared_ptr< Setters > m_setters
設定指定構築時に指定された Setters
Definition: Spdlog.h:60
virtual void set_pattern(spdlog::sinks::sink &the_sink, const std::string &the_pattern)
ログ出力パターンを設定する
Definition: Spdlog.cpp:177
ログ出力の詳細を担うインタフェース
Definition: ILogger.h:13
std::shared_ptr< spdlog::logger > m_old_logger
構築前のデフォルトロガーを保持しておく
Definition: Spdlog.h:59
virtual void set_level(spdlog::sinks::sink &the_sink, const std::string &the_level)
ログレベルを設定する
Definition: Spdlog.cpp:170
Spdlog & operator=(const Spdlog &)=delete
virtual ~Setters()=default
ログレベル・出力パターンをspdlogに設定するファンクタ
Definition: Spdlog.h:27
spdlogを用いてログ出力する
Definition: Spdlog.h:20
spdlog::level::level_enum convert_level(const std::string &the_level) const
ログレベル文字列を spdlog のログレベル enum に変換する
Definition: Spdlog.cpp:129
Spdlog()
デフォルト構築
Definition: Spdlog.cpp:14
~Spdlog() override
Definition: Spdlog.cpp:63
std::shared_ptr< spdlog::logger > logger()
Definition: Spdlog.cpp:96
spdlog::sink_ptr generate_sink(const Config::Spdlog::Sink &the_sink_config)
Definition: Spdlog.cpp:102
void output(const Logger::Level the_log_level, const std::string &the_log_message) override
ログ出力
Definition: Spdlog.cpp:68