EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
SpdlogMixin.h
Go to the documentation of this file.
1// Created by Dmitry Romanov
2// Subject to the terms in the LICENSE file found in the top-level directory.
3//
4
5#pragma once
6
7#include <memory>
8#include <spdlog/spdlog.h>
9#include <JANA/JApplicationFwd.h>
11#include "SpdlogExtensions.h"
12
13namespace eicrecon {
32public:
34
53 void InitLogger(JApplication* app, const std::string& param_prefix,
54 const level default_level = level::info) {
55
56 // Logger. Get plugin level sub-log
57 m_log = app->GetService<Log_service>()->logger(param_prefix, default_level);
58 }
59
60public:
61 std::shared_ptr<spdlog::logger>& logger() { return m_log; }
62
63protected: // FIXME change to private
65 std::shared_ptr<spdlog::logger> m_log;
66};
67} // namespace eicrecon
Definition Log_service.h:15
spdlog::level::level_enum level
Definition Log_service.h:17
Definition SpdlogMixin.h:14
Log_service::level level
Definition SpdlogMixin.h:33
std::shared_ptr< spdlog::logger > m_log
current logger
Definition SpdlogMixin.h:65
std::shared_ptr< spdlog::logger > & logger()
Definition SpdlogMixin.h:61
void InitLogger(JApplication *app, const std::string &param_prefix, const level default_level=level::info)
Definition SpdlogMixin.h:53
-client
Definition CalorimeterClusterRecoCoG.cc:37