CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Attributes
edm::Log< LVL, VERBATIM > Class Template Reference

#include <MessageLogger.h>

Inheritance diagram for edm::Log< LVL, VERBATIM >:
cscdqm::LogError cscdqm::LogInfo cscdqm::LogWarn

Public Types

using ThisLog = Log< LVL, VERBATIM >
 

Public Member Functions

template<typename... Args>
ThisLogformat (fmt::format_string< Args... > format, Args &&... args)
 
 Log (std::string_view id)
 
 Log (ThisLog &&)=default
 
 Log (ThisLog const &)=delete
 
template<typename F >
ThisLoglog (F &&iF)
 
template<class T >
ThisLogoperator<< (T const &t)
 
ThisLogoperator<< (std::ostream &(*f)(std::ostream &))
 
ThisLogoperator<< (std::ios_base &(*f)(std::ios_base &))
 
Logoperator= (ThisLog const &)=delete
 
Logoperator= (ThisLog &&)=default
 
ThisLogvformat (std::string_view fmt, fmt::format_args args)
 
 ~Log ()=default
 

Protected Member Functions

 Log ()=default
 
 Log (std::nullptr_t, ThisLog const &iOther)
 

Private Attributes

MessageSender ap
 

Detailed Description

template<typename LVL, bool VERBATIM>
class edm::Log< LVL, VERBATIM >

Definition at line 70 of file MessageLogger.h.

Member Typedef Documentation

◆ ThisLog

template<typename LVL, bool VERBATIM>
using edm::Log< LVL, VERBATIM >::ThisLog = Log<LVL, VERBATIM>

Definition at line 72 of file MessageLogger.h.

Constructor & Destructor Documentation

◆ Log() [1/5]

template<typename LVL, bool VERBATIM>
edm::Log< LVL, VERBATIM >::Log ( std::string_view  id)
inlineexplicit

Definition at line 73 of file MessageLogger.h.

73 : ap(LVL::level, id, VERBATIM, LVL::suppress()) {}
MessageSender ap

◆ Log() [2/5]

template<typename LVL, bool VERBATIM>
edm::Log< LVL, VERBATIM >::Log ( ThisLog< LVL, VERBATIM > &&  )
default

◆ Log() [3/5]

template<typename LVL, bool VERBATIM>
edm::Log< LVL, VERBATIM >::Log ( ThisLog< LVL, VERBATIM > const &  )
delete

◆ ~Log()

template<typename LVL, bool VERBATIM>
edm::Log< LVL, VERBATIM >::~Log ( )
default

◆ Log() [4/5]

template<typename LVL, bool VERBATIM>
edm::Log< LVL, VERBATIM >::Log ( )
protecteddefault

◆ Log() [5/5]

template<typename LVL, bool VERBATIM>
edm::Log< LVL, VERBATIM >::Log ( std::nullptr_t  ,
ThisLog< LVL, VERBATIM > const &  iOther 
)
inlineprotected

Definition at line 123 of file MessageLogger.h.

123 : ap(iOther.ap) {}
MessageSender ap

Member Function Documentation

◆ format()

template<typename LVL, bool VERBATIM>
template<typename... Args>
ThisLog& edm::Log< LVL, VERBATIM >::format ( fmt::format_string< Args... >  format,
Args &&...  args 
)
inline

Definition at line 98 of file MessageLogger.h.

98  {
99  if (ap.valid())
100  ap.format(std::move(format), std::forward<Args>(args)...);
101  return *this;
102  }
MessageSender ap
MessageSender & format(fmt::format_string< Args... > format, Args &&... args)
Definition: MessageSender.h:41
def move(src, dest)
Definition: eostools.py:511
bool valid() const noexcept
Definition: MessageSender.h:54

◆ log()

template<typename LVL, bool VERBATIM>
template<typename F >
ThisLog& edm::Log< LVL, VERBATIM >::log ( F &&  iF)
inline

Definition at line 111 of file MessageLogger.h.

111  {
112  if (ap.valid()) {
113  iF(ap);
114  }
115  return *this;
116  }
MessageSender ap
bool valid() const noexcept
Definition: MessageSender.h:54

◆ operator<<() [1/3]

template<typename LVL, bool VERBATIM>
template<class T >
ThisLog& edm::Log< LVL, VERBATIM >::operator<< ( T const &  t)
inline

Definition at line 81 of file MessageLogger.h.

81  {
82  if (ap.valid())
83  ap << t;
84  return *this;
85  }
MessageSender ap
bool valid() const noexcept
Definition: MessageSender.h:54

◆ operator<<() [2/3]

template<typename LVL, bool VERBATIM>
ThisLog& edm::Log< LVL, VERBATIM >::operator<< ( std::ostream &(*)(std::ostream &)  f)
inline

Definition at line 86 of file MessageLogger.h.

86  {
87  if (ap.valid())
88  ap << f;
89  return *this;
90  }
MessageSender ap
double f[11][100]
bool valid() const noexcept
Definition: MessageSender.h:54

◆ operator<<() [3/3]

template<typename LVL, bool VERBATIM>
ThisLog& edm::Log< LVL, VERBATIM >::operator<< ( std::ios_base &(*)(std::ios_base &)  f)
inline

Definition at line 91 of file MessageLogger.h.

91  {
92  if (ap.valid())
93  ap << f;
94  return *this;
95  }
MessageSender ap
double f[11][100]
bool valid() const noexcept
Definition: MessageSender.h:54

◆ operator=() [1/2]

template<typename LVL, bool VERBATIM>
Log& edm::Log< LVL, VERBATIM >::operator= ( ThisLog< LVL, VERBATIM > const &  )
delete

◆ operator=() [2/2]

template<typename LVL, bool VERBATIM>
Log& edm::Log< LVL, VERBATIM >::operator= ( ThisLog< LVL, VERBATIM > &&  )
default

◆ vformat()

template<typename LVL, bool VERBATIM>
ThisLog& edm::Log< LVL, VERBATIM >::vformat ( std::string_view  fmt,
fmt::format_args  args 
)
inline

Definition at line 104 of file MessageLogger.h.

104  {
105  if (ap.valid())
106  ap.vformat(fmt, std::move(args));
107  return *this;
108  }
MessageSender ap
MessageSender & vformat(std::string_view fmt, fmt::format_args args)
Definition: MessageSender.h:48
def move(src, dest)
Definition: eostools.py:511
bool valid() const noexcept
Definition: MessageSender.h:54

Member Data Documentation

◆ ap

template<typename LVL, bool VERBATIM>
MessageSender edm::Log< LVL, VERBATIM >::ap
private