Changeset 141 in pacpusframework for branches/2.0-beta1/include/Pacpus
- Timestamp:
- Jul 30, 2013, 5:48:06 PM (11 years ago)
- Location:
- branches/2.0-beta1/include/Pacpus/kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0-beta1/include/Pacpus/kernel/DbiteException.h
r89 r141 43 43 virtual const char* what() const throw(); 44 44 45 46 45 private: 47 46 std::string mWhat; -
branches/2.0-beta1/include/Pacpus/kernel/Log.h
r89 r141 28 28 public: 29 29 LogConfigurator(); 30 ~LogConfigurator();31 32 30 static void configureLoggerWithFile(const char * configFilename); 33 } initializer; // using Schwarz/nifty counter idiom for static initialization31 } logInitializer; 34 32 35 33 } // namespace pacpus 36 34 37 #ifdef PACPUS_USE_LOG 38 #include <log4cxx/logger.h> 35 #if defined(PACPUS_USE_LOG) 39 36 40 class QString; 41 42 #define DECLARE_STATIC_LOGGER(name) \ 43 static log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger(name)) 37 #include <boost/log/trivial.hpp> 38 #include <iosfwd> 39 class QString; 44 40 45 #define LOG_TRACE(message) LOG4CXX_TRACE(logger, message) 46 #define LOG_DEBUG(message) LOG4CXX_DEBUG(logger, message) 47 #define LOG_INFO(message) LOG4CXX_INFO(logger, message) 48 #define LOG_WARN(message) LOG4CXX_WARN(logger, message) 49 #define LOG_ERROR(message) LOG4CXX_ERROR(logger, message) 50 #define LOG_FATAL(message) LOG4CXX_FATAL(logger, message) 41 template< typename CharT, typename TraitsT > 42 PACPUSLIB_API std::basic_ostream< CharT, TraitsT >& operator<< (std::basic_ostream< CharT, TraitsT >& strm, QString const& s); 51 43 52 /// Output stream ::log4cxx::helpers::CharMessageBuffer operator for QString 53 PACPUSLIB_API ::log4cxx::helpers::CharMessageBuffer & operator<<(::log4cxx::helpers::CharMessageBuffer & os, const QString & s); 54 /// Output stream ::log4cxx::helpers::MessageBuffer operator for QString 55 PACPUSLIB_API ::log4cxx::helpers::CharMessageBuffer & operator<<(::log4cxx::helpers::MessageBuffer & os, const QString & s); 44 #define DECLARE_STATIC_LOGGER(name) 45 46 #define LOG(level, message) BOOST_LOG_TRIVIAL(level) << message 47 #define LOG_TRACE(message) LOG(trace, message) 48 #define LOG_DEBUG(message) LOG(debug, message) 49 #define LOG_INFO(message) LOG(info, message) 50 #define LOG_WARN(message) LOG(warning, message) 51 #define LOG_ERROR(message) LOG(error, message) 52 #define LOG_FATAL(message) LOG(fatal, message) 56 53 57 54 #else 58 /// Declares a log4cxx logger 59 /// 60 /// @param name Name of the logger, displayed when logging a message. 61 #define DECLARE_STATIC_LOGGER(name) 62 /// Logs a message at TRACE level using default logger 63 #define LOG_TRACE(message) 64 /// Logs a message at DEBUG level using default logger 65 #define LOG_DEBUG(message) 66 /// Logs a message at INFO level using default logger 67 #define LOG_INFO(message) 68 /// Logs a message at WARN level using default logger 69 #define LOG_WARN(message) 70 /// Logs a message at ERROR level using default logger 71 #define LOG_ERROR(message) 72 /// Logs a message at FATAL level using default logger 73 #define LOG_FATAL(message) 55 56 /// @param name Name of the logger, displayed when logging a message. 57 #define DECLARE_STATIC_LOGGER(name) 58 /// Logs a message at TRACE level using default logger 59 #define LOG_TRACE(message) 60 /// Logs a message at DEBUG level using default logger 61 #define LOG_DEBUG(message) 62 /// Logs a message at INFO level using default logger 63 #define LOG_INFO(message) 64 /// Logs a message at WARN level using default logger 65 #define LOG_WARN(message) 66 /// Logs a message at ERROR level using default logger 67 #define LOG_ERROR(message) 68 /// Logs a message at FATAL level using default logger 69 #define LOG_FATAL(message) 70 74 71 #endif // PACPUS_USE_LOG 75 72 -
branches/2.0-beta1/include/Pacpus/kernel/PacpusApplication.h
r89 r141 16 16 17 17 #include <QApplication> 18 19 #include <Pacpus/kernel/pacpus.h> 18 20 19 21 namespace pacpus {
Note:
See TracChangeset
for help on using the changeset viewer.