Classes | Namespaces | Macros | Variables
Messenger.h File Reference
#include <iostream>
#include <cstring>
#include <string>
#include <map>
#include "log4cpp/Category.hh"
#include "log4cpp/Appender.hh"
#include "log4cpp/OstreamAppender.hh"
#include "log4cpp/BasicLayout.hh"
#include "log4cpp/Priority.hh"
#include "Framework/Conventions/GBuild.h"

Go to the source code of this file.

Classes

class  genie::Messenger
 A more convenient interface to the log4cpp Message Service. More...
 
struct  genie::Messenger::Cleaner
 

Namespaces

 genie
 THE MAIN GENIE PROJECT NAMESPACE
 

Macros

#define pFATAL   log4cpp::Priority::FATAL
 
#define pALERT   log4cpp::Priority::ALERT
 
#define pCRIT   log4cpp::Priority::CRIT
 
#define pERROR   log4cpp::Priority::ERROR
 
#define pWARN   log4cpp::Priority::WARN
 
#define pNOTICE   log4cpp::Priority::NOTICE
 
#define pINFO   log4cpp::Priority::INFO
 
#define pDEBUG   log4cpp::Priority::DEBUG
 
#define ENDL   std::endl
 
#define SLOG(stream, priority)
 A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and LINE macros) with information for the calling method [produces short message]. More...
 
#define LOG(stream, priority)
 A macro that returns the requested log4cpp::Category appending a string (using the FILE, FUNCTION and LINE macros) with information for the calling method [produces normal messages]. More...
 
#define LOG_FATAL(stream)
 
#define LOG_ALERT(stream)
 
#define LOG_CRIT(stream)
 
#define LOG_ERROR(stream)
 
#define LOG_WARN(stream)
 
#define LOG_NOTICE(stream)
 
#define LOG_INFO(stream)
 
#define LOG_DEBUG(stream)
 
#define LLOG(stream, priority)
 A macro that returns the requested log4cpp::Category appending a string (using the PRETTY_FUNCTION and LINE macros) with information for the calling method [produces long messages]. More...
 
#define LLOG_FATAL(stream)
 
#define LLOG_ALERT(stream)
 
#define LLOG_CRIT(stream)
 
#define LLOG_ERROR(stream)
 
#define LLOG_WARN(stream)
 
#define LLOG_NOTICE(stream)
 
#define LLOG_INFO(stream)
 
#define LLOG_DEBUG(stream)
 
#define BLOG(stream, priority)   (*Messenger::Instance())(stream) << priority
 A macro that returns the requested log4cpp::Category appending no additional information. More...
 
#define TOKCAT(x, y)   x##y
 
#define TOKCAT2(x, y)   TOKCAT(x,y)
 
#define LINECAT(x)   TOKCAT2(x, __LINE__ )
 
#define MAXSLOG(s, l, c)
 Similar to SLOG(stream,priority) but quits after "maxcount" messages. More...
 
#define MAXLOG(s, l, c)
 Similar to LOG(stream,priority) but quits after "maxcount" messages. More...
 
#define MAXLLOG(s, l, c)
 Similar to LLOG(stream,priority) but quits after "maxcount" messages. More...
 

Variables

bool genie::gAbortingInErr = false
 

Macro Definition Documentation

#define BLOG (   stream,
  priority 
)    (*Messenger::Instance())(stream) << priority

A macro that returns the requested log4cpp::Category appending no additional information.

Definition at line 212 of file Messenger.h.

#define ENDL   std::endl

Definition at line 74 of file Messenger.h.

#define LINECAT (   x)    TOKCAT2(x, __LINE__ )

Definition at line 233 of file Messenger.h.

#define LLOG (   stream,
  priority 
)
Value:
(*Messenger::Instance())(stream) \
<< priority << "[l] <" \
<< __PRETTY_FUNCTION__ << " (" << __LINE__ << ")> : "

A macro that returns the requested log4cpp::Category appending a string (using the PRETTY_FUNCTION and LINE macros) with information for the calling method [produces long messages].

Definition at line 161 of file Messenger.h.

#define LLOG_ALERT (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::ALERT << "[l] <" \
<< __PRETTY_FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 171 of file Messenger.h.

#define LLOG_CRIT (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::CRIT << "[l] <" \
<< __PRETTY_FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 176 of file Messenger.h.

#define LLOG_DEBUG (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::DEBUG << "[l] <" \
<< __PRETTY_FUNCTION__ << " (" << __LINE__ << ")> : "
#define DEBUG
Definition: qglobal.h:491

Definition at line 201 of file Messenger.h.

#define LLOG_ERROR (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::ERROR << "[l] <" \
<< __PRETTY_FUNCTION__ << " (" << __LINE__ << ")> : "
#define ERROR

Definition at line 181 of file Messenger.h.

#define LLOG_FATAL (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::FATAL << "[l] <" \
<< __PRETTY_FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 166 of file Messenger.h.

#define LLOG_INFO (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::INFO << "[l] <" \
<< __PRETTY_FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 196 of file Messenger.h.

#define LLOG_NOTICE (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::NOTICE << "[l] <" \
<< __PRETTY_FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 191 of file Messenger.h.

#define LLOG_WARN (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::WARN << "'[l] <" \
<< __PRETTY_FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 186 of file Messenger.h.

#define LOG (   stream,
  priority 
)
Value:
(*Messenger::Instance())(stream) \
<< priority << "[n] <" \
<< __FILE__ << "::" << __FUNCTION__ << " (" << __LINE__ << ")> : "

A macro that returns the requested log4cpp::Category appending a string (using the FILE, FUNCTION and LINE macros) with information for the calling method [produces normal messages].

Definition at line 96 of file Messenger.h.

#define LOG_ALERT (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::ALERT << "[n] <" \
<< __FILE__ << "::" << __FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 117 of file Messenger.h.

#define LOG_CRIT (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::CRIT << "[n] <" \
<< __FILE__ << "::" << __FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 122 of file Messenger.h.

#define LOG_DEBUG (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::DEBUG << "[n] <" \
<< __FILE__ << "::" << __FUNCTION__ << " (" << __LINE__ << ")> : "
#define DEBUG
Definition: qglobal.h:491

Definition at line 147 of file Messenger.h.

#define LOG_ERROR (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::ERROR << "[n] <" \
<< __FILE__ << "::" << __FUNCTION__ << " (" << __LINE__ << ")> : "
#define ERROR

Definition at line 127 of file Messenger.h.

#define LOG_FATAL (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::FATAL << "[n] <" \
<< __FILE__ << "::" << __FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 112 of file Messenger.h.

#define LOG_INFO (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::INFO << "[n] <" \
<< __FILE__ << "::" << __FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 142 of file Messenger.h.

#define LOG_NOTICE (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::NOTICE << "[n] <" \
<< __FILE__ << "::" << __FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 137 of file Messenger.h.

#define LOG_WARN (   stream)
Value:
(*Messenger::Instance())(stream) \
<< log4cpp::Priority::WARN << "[n] <" \
<< __FILE__ << "::" << __FUNCTION__ << " (" << __LINE__ << ")> : "

Definition at line 132 of file Messenger.h.

#define MAXLLOG (   s,
  l,
 
)
Value:
static int LINECAT(MSGCNT) = 0; \
const char* LINECAT(MSGADD) = (++LINECAT(MSGCNT)==c) ? "..Last Message .. " : ""; \
if (LINECAT(MSGCNT) > c || LINECAT(MSGCNT) < 0) \
{;} else LLOG(s,l) << LINECAT(MSGADD)
#define LLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the PRETTY_FUNCTION an...
Definition: Messenger.h:161
#define LINECAT(x)
Definition: Messenger.h:233
static QStrList * l
Definition: config.cpp:1044
if(!yymsg) yymsg
static QCString * s
Definition: config.cpp:1042

Similar to LLOG(stream,priority) but quits after "maxcount" messages.

Definition at line 247 of file Messenger.h.

#define MAXLOG (   s,
  l,
 
)
Value:
static int LINECAT(MSGCNT) = 0; \
const char* LINECAT(MSGADD) = (++LINECAT(MSGCNT)==c) ? "..Last Message .. " : ""; \
if (LINECAT(MSGCNT) > c || LINECAT(MSGCNT) < 0) \
{;} else LOG(s,l) << LINECAT(MSGADD)
#define LINECAT(x)
Definition: Messenger.h:233
static QStrList * l
Definition: config.cpp:1044
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
if(!yymsg) yymsg
static QCString * s
Definition: config.cpp:1042

Similar to LOG(stream,priority) but quits after "maxcount" messages.

Definition at line 241 of file Messenger.h.

#define MAXSLOG (   s,
  l,
 
)
Value:
static int LINECAT(MSGCNT) = 0; \
const char* LINECAT(MSGADD) = (++LINECAT(MSGCNT)==c) ? "..Last Message .. " : ""; \
if (LINECAT(MSGCNT) > c || LINECAT(MSGCNT) < 0) \
{;} else SLOG(s,l) << LINECAT(MSGADD)
#define LINECAT(x)
Definition: Messenger.h:233
static QStrList * l
Definition: config.cpp:1044
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Definition: Messenger.h:84
if(!yymsg) yymsg
static QCString * s
Definition: config.cpp:1042

Similar to SLOG(stream,priority) but quits after "maxcount" messages.

Definition at line 235 of file Messenger.h.

#define pALERT   log4cpp::Priority::ALERT

Definition at line 57 of file Messenger.h.

#define pCRIT   log4cpp::Priority::CRIT

Definition at line 58 of file Messenger.h.

#define pDEBUG   log4cpp::Priority::DEBUG

Definition at line 63 of file Messenger.h.

#define pERROR   log4cpp::Priority::ERROR

Definition at line 59 of file Messenger.h.

#define pFATAL   log4cpp::Priority::FATAL

Definition at line 56 of file Messenger.h.

#define pINFO   log4cpp::Priority::INFO

Definition at line 62 of file Messenger.h.

#define pNOTICE   log4cpp::Priority::NOTICE

Definition at line 61 of file Messenger.h.

#define pWARN   log4cpp::Priority::WARN

Definition at line 60 of file Messenger.h.

#define SLOG (   stream,
  priority 
)
Value:
(*Messenger::Instance())(stream) \
<< priority << "[s] <" \
<< __FUNCTION__ << " (" << __LINE__ << ")> : "

A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and LINE macros) with information for the calling method [produces short message].

Definition at line 84 of file Messenger.h.

#define TOKCAT (   x,
 
)    x##y

Definition at line 229 of file Messenger.h.

#define TOKCAT2 (   x,
 
)    TOKCAT(x,y)

Definition at line 231 of file Messenger.h.