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 (std::string_view fmt, Args const &... 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
 
 ~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 117 of file MessageLogger.h.

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

Member Function Documentation

◆ format()

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

Definition at line 98 of file MessageLogger.h.

98  {
99  if (ap.valid())
100  ap.format(fmt, args...);
101  return *this;
102  }
MessageSender & format(std::string_view fmt, Args const &... args)
Definition: MessageSender.h:41
MessageSender ap
bool valid() const noexcept
Definition: MessageSender.h:47

◆ log()

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

Definition at line 105 of file MessageLogger.h.

105  {
106  if (ap.valid()) {
107  iF(ap);
108  }
109  return *this;
110  }
MessageSender ap
bool valid() const noexcept
Definition: MessageSender.h:47

◆ 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:47

◆ 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:47

◆ 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:47

◆ 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

Member Data Documentation

◆ ap

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