EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
eicrecon::SpdlogMixin Class Reference

#include <SpdlogMixin.h>

Inheritance diagram for eicrecon::SpdlogMixin:
Inheritance graph
[legend]

Public Types

using level = Log_service::level
 

Public Member Functions

void InitLogger (JApplication *app, const std::string &param_prefix, const level default_level=level::info)
 
std::shared_ptr< spdlog::logger > & logger ()
 

Protected Attributes

std::shared_ptr< spdlog::logger > m_log
 current logger
 

Member Typedef Documentation

◆ level

Logger mixin

 @example:
      class MyFactory : JFactory, SpdlogMixin {

          void Init() {
              InitLogger(GetApplication(), "MyPlugin:MyFactory");

              // Logger is ready and can be used:
              m_log->info("MyFactory logger initialized");
          }

          void Process(...) {
              m_log->trace("Using logger!");
          }
      };
Examples
/home/runner/work/EICrecon/EICrecon/src/extensions/spdlog/SpdlogMixin.h.

Member Function Documentation

◆ InitLogger()

void eicrecon::SpdlogMixin::InitLogger ( JApplication app,
const std::string &  param_prefix,
const level  default_level = level::info 
)
inline

◆ logger()

std::shared_ptr< spdlog::logger > & eicrecon::SpdlogMixin::logger ( )
inline

Member Data Documentation

◆ m_log

std::shared_ptr<spdlog::logger> eicrecon::SpdlogMixin::m_log
protected

The documentation for this class was generated from the following file: