E-MailRelay
Classes | Namespaces | Macros
glog.h File Reference
#include "gdef.h"
#include "glogstream.h"
#include "gformat.h"
#include <sstream>
#include <string>
+ Include dependency graph for glog.h:

Go to the source code of this file.

Classes

class  G::Log
 A class for doing iostream-based logging. More...
 

Namespaces

namespace  G
 Low-level classes.
 

Macros

#define G_LOG_IMP(expr, severity)   do { if(G::Log::at(severity)) G::Log((severity),__FILE__,__LINE__) << expr ; } while(0) /* NOLINT bugprone-macro-parentheses */
 
#define G_LOG_IMP_IF(cond, expr, severity)   do { if(G::Log::at(severity)&&(cond)) G::Log((severity),__FILE__,__LINE__) << expr ; } while(0) /* NOLINT bugprone-macro-parentheses */
 
#define G_LOG_IMP_ONCE(expr, severity)   do { static bool done__ = false ; if(!done__&&G::Log::at(severity)) { G::Log((severity),__FILE__,__LINE__) << expr ; done__ = true ; } } while(0) /* NOLINT bugprone-macro-parentheses */
 
#define G_DEBUG(expr)
 
#define G_DEBUG_IF(cond, expr)
 
#define G_DEBUG_ONCE(group, expr)
 
#define G_LOG(expr)   G_LOG_IMP( expr , G::Log::Severity::InfoVerbose )
 
#define G_LOG_IF(cond, expr)   G_LOG_IMP_IF( cond , expr , G::Log::Severity::InfoVerbose )
 
#define G_LOG_ONCE(expr)   G_LOG_IMP_ONCE( expr , G::Log::Severity::InfoVerbose )
 
#define G_LOG_MORE(expr)   G_LOG_IMP( expr , G::Log::Severity::InfoMoreVerbose )
 
#define G_LOG_MORE_IF(cond, expr)   G_LOG_IMP_IF( cond , expr , G::Log::Severity::InfoMoreVerbose )
 
#define G_LOG_MORE_ONCE(expr)   G_LOG_IMP_ONCE( expr , G::Log::Severity::InfoMoreVerbose )
 
#define G_LOG_S(expr)   G_LOG_IMP( expr , G::Log::Severity::InfoSummary )
 
#define G_LOG_S_IF(cond, expr)   G_LOG_IMP_IF( cond , expr , G::Log::Severity::InfoSummary )
 
#define G_LOG_S_ONCE(expr)   G_LOG_IMP_ONCE( expr , G::Log::Severity::InfoSummary )
 
#define G_WARNING(expr)   G_LOG_IMP( expr , G::Log::Severity::Warning )
 
#define G_WARNING_IF(cond, expr)   G_LOG_IMP_IF( cond , expr , G::Log::Severity::Warning )
 
#define G_WARNING_ONCE(expr)   G_LOG_IMP_ONCE( expr , G::Log::Severity::Warning )
 
#define G_ERROR(expr)   G_LOG_IMP( expr , G::Log::Severity::Error )
 

Macro Definition Documentation

◆ G_DEBUG

#define G_DEBUG (   expr)

Definition at line 146 of file glog.h.

◆ G_DEBUG_IF

#define G_DEBUG_IF (   cond,
  expr 
)

Definition at line 147 of file glog.h.

◆ G_DEBUG_ONCE

#define G_DEBUG_ONCE (   group,
  expr 
)

Definition at line 148 of file glog.h.

◆ G_ERROR

#define G_ERROR (   expr)    G_LOG_IMP( expr , G::Log::Severity::Error )

Definition at line 192 of file glog.h.

◆ G_LOG

#define G_LOG (   expr)    G_LOG_IMP( expr , G::Log::Severity::InfoVerbose )

Definition at line 152 of file glog.h.

◆ G_LOG_IF

#define G_LOG_IF (   cond,
  expr 
)    G_LOG_IMP_IF( cond , expr , G::Log::Severity::InfoVerbose )

Definition at line 153 of file glog.h.

◆ G_LOG_IMP

#define G_LOG_IMP (   expr,
  severity 
)    do { if(G::Log::at(severity)) G::Log((severity),__FILE__,__LINE__) << expr ; } while(0) /* NOLINT bugprone-macro-parentheses */

Definition at line 137 of file glog.h.

◆ G_LOG_IMP_IF

#define G_LOG_IMP_IF (   cond,
  expr,
  severity 
)    do { if(G::Log::at(severity)&&(cond)) G::Log((severity),__FILE__,__LINE__) << expr ; } while(0) /* NOLINT bugprone-macro-parentheses */

Definition at line 138 of file glog.h.

◆ G_LOG_IMP_ONCE

#define G_LOG_IMP_ONCE (   expr,
  severity 
)    do { static bool done__ = false ; if(!done__&&G::Log::at(severity)) { G::Log((severity),__FILE__,__LINE__) << expr ; done__ = true ; } } while(0) /* NOLINT bugprone-macro-parentheses */

Definition at line 139 of file glog.h.

◆ G_LOG_MORE

#define G_LOG_MORE (   expr)    G_LOG_IMP( expr , G::Log::Severity::InfoMoreVerbose )

Definition at line 162 of file glog.h.

◆ G_LOG_MORE_IF

#define G_LOG_MORE_IF (   cond,
  expr 
)    G_LOG_IMP_IF( cond , expr , G::Log::Severity::InfoMoreVerbose )

Definition at line 163 of file glog.h.

◆ G_LOG_MORE_ONCE

#define G_LOG_MORE_ONCE (   expr)    G_LOG_IMP_ONCE( expr , G::Log::Severity::InfoMoreVerbose )

Definition at line 164 of file glog.h.

◆ G_LOG_ONCE

#define G_LOG_ONCE (   expr)    G_LOG_IMP_ONCE( expr , G::Log::Severity::InfoVerbose )

Definition at line 154 of file glog.h.

◆ G_LOG_S

#define G_LOG_S (   expr)    G_LOG_IMP( expr , G::Log::Severity::InfoSummary )

Definition at line 172 of file glog.h.

◆ G_LOG_S_IF

#define G_LOG_S_IF (   cond,
  expr 
)    G_LOG_IMP_IF( cond , expr , G::Log::Severity::InfoSummary )

Definition at line 173 of file glog.h.

◆ G_LOG_S_ONCE

#define G_LOG_S_ONCE (   expr)    G_LOG_IMP_ONCE( expr , G::Log::Severity::InfoSummary )

Definition at line 174 of file glog.h.

◆ G_WARNING

#define G_WARNING (   expr)    G_LOG_IMP( expr , G::Log::Severity::Warning )

Definition at line 182 of file glog.h.

◆ G_WARNING_IF

#define G_WARNING_IF (   cond,
  expr 
)    G_LOG_IMP_IF( cond , expr , G::Log::Severity::Warning )

Definition at line 183 of file glog.h.

◆ G_WARNING_ONCE

#define G_WARNING_ONCE (   expr)    G_LOG_IMP_ONCE( expr , G::Log::Severity::Warning )

Definition at line 184 of file glog.h.