Memosa-FVM  0.2
RLogInterface.h
Go to the documentation of this file.
1 // This file os part of FVM
2 // Copyright (c) 2012 FVM Authors
3 // See LICENSE file for terms.
4 
5 #ifndef _RLOGINTERFACE_H_
6 #define _RLOGINTERFACE_H_
7 
8 #include <rlog/rlog.h>
9 #include "CException.h"
10 
11 using namespace std;
12 
13 
15 {
16 public:
17 
18  static rlog::RLogChannel *ctorChannel;
19  static rlog::RLogChannel *dtorChannel;
20  static rlog::RLogChannel *infoChannel;
21  static rlog::RLogChannel *warningChannel;
22  static rlog::RLogChannel *errorChannel;
23 
24 };
25 
26 #define logCtor() _rMessage(LOGID, RLogInterface::ctorChannel, "constructing %s (%p)", \
27  getTypeName().c_str(), this)
28 
29 #define logCtorVerbose(str,...) _rMessage(LOGID, RLogInterface::ctorChannel, \
30  "constructing %s (%p) "str, \
31  getTypeName().c_str(), this, ##__VA_ARGS__)
32 
33 #define logDtor() _rMessage(LOGID, RLogInterface::dtorChannel, "destroying %s (%p)", \
34  getTypeName().c_str(), this)
35 
36 #define logDtorVerbose(str,...) _rMessage(LOGID, RLogInterface::dtorChannel, \
37  "destroying %s (%p) "str, \
38  getTypeName().c_str(), this, ##__VA_ARGS__)
39 
40 #define logInfo(...) _rMessage(LOGID, RLogInterface::infoChannel, ##__VA_ARGS__)
41 #define logWarning(...) _rMessage(LOGID, RLogInterface::warningChannel, ##__VA_ARGS__)
42 #define logError(...) _rMessage(LOGID, RLogInterface::errorChannel, ##__VA_ARGS__)
43 
44 
45 
46 #define DEFINE_TYPENAME(T) \
47  static string getTypeName() {return T;} \
48 
49 #endif
static rlog::RLogChannel * warningChannel
Definition: RLogInterface.h:21
static rlog::RLogChannel * errorChannel
Definition: RLogInterface.h:22
static rlog::RLogChannel * ctorChannel
Definition: RLogInterface.h:18
static rlog::RLogChannel * dtorChannel
Definition: RLogInterface.h:19
static rlog::RLogChannel * infoChannel
Definition: RLogInterface.h:20