StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StLoggerConfig.h
Go to the documentation of this file.
1 #ifndef STAR_STLOGGERCONFIG
2 #define STAR_STLOGGERCONFIG
3 
7 #if __GNUC__ >= 4
8 # define STAR_LOG4CXX_VERSION 10
9 #else
10 # define STAR_LOG4CXX_VERSION 9
11 #endif
12 
13 #include <log4cxx/helpers/stringhelper.h>
14 
15 #if (STAR_LOG4CXX_VERSION == 9)
16 # include <log4cxx/config.h>
17 # include <log4cxx/varia/stringmatchfilter.h>
18 # include <log4cxx/varia/denyallfilter.h>
19 # define LOG4CXX_LEVEL_FATAL Level::FATAL
20 # define LOG4CXX_LEVEL_ERROR Level::ERROR
21 # define LOG4CXX_LEVEL_WARN Level::WARN
22 # define LOG4CXX_LEVEL_INFO Level::INFO
23 # define LOG4CXX_LEVEL_DEBUG Level::DEBUG
24 # define LocationInfo(sourceFileName,sourceFunction,lineNumber) sourceFileName,lineNumber
25 #else
26 # include <log4cxx/logstring.h>
27 # include <log4cxx/filter/stringmatchfilter.h>
28 # include <log4cxx/filter/denyallfilter.h>
29 # include <log4cxx/helpers/messagebuffer.h>
30 # define LOG4CXX_LEVEL_FATAL Level::getFatal()
31 # define LOG4CXX_LEVEL_ERROR Level::getError()
32 # define LOG4CXX_LEVEL_WARN Level::getWarn()
33 # define LOG4CXX_LEVEL_INFO Level::getInfo()
34 # define LOG4CXX_LEVEL_DEBUG Level::getDebug()
35  namespace log4cxx {
36  typedef LogString String;
37  typedef helpers::CharMessageBuffer StringBuffer;
38  }
39 
40  #define _T(str) std::string(str)
41 
42 #endif /* LOG4CXX10 */
43 
44 namespace log4cxx {
45 
46  inline bool equalsIgnoreCase(const String& option1, const String& option2)
47  {
48  return
49  helpers::StringHelper::equalsIgnoreCase(option1,option2
50 #if (STAR_LOG4CXX_VERSION==10)
51  ,option2
52 #endif
53  );
54  }
55 }
56 #endif /* STAR_STLOGGERCONFIG */