Changeset 108 in pacpusframework


Ignore:
Timestamp:
Jun 7, 2013, 11:28:34 AM (12 years ago)
Author:
aschildk
Message:

Fix bogus macro definition, ticket #55

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/Pacpus/kernel/Log.h

    r73 r108  
    4343    static log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger(name))
    4444
    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)
     45  /* https://devel.hds.utc.fr/projects/pacpus/ticket/55 */
     46  #define LOG_TRACE(message)          do{LOG4CXX_TRACE(logger, message);}while(0)
     47  #define LOG_DEBUG(message)          do{LOG4CXX_DEBUG(logger, message);}while(0)
     48  #define LOG_INFO(message)           do{LOG4CXX_INFO(logger, message);}while(0)
     49  #define LOG_WARN(message)           do{LOG4CXX_WARN(logger, message);}while(0)
     50  #define LOG_ERROR(message)          do{LOG4CXX_ERROR(logger, message);}while(0)
     51  #define LOG_FATAL(message)          do{LOG4CXX_FATAL(logger, message);}while(0)
    5152
    5253  /// Output stream ::log4cxx::helpers::CharMessageBuffer operator for QString
     
    5960  ///
    6061  /// @param name Name of the logger, displayed when logging a message.
    61   #define DECLARE_STATIC_LOGGER(name)
     62  #define DECLARE_STATIC_LOGGER(name) ;
    6263  /// Logs a message at TRACE level using default logger
    63   #define LOG_TRACE(message)
     64  #define LOG_TRACE(message)          ;
    6465  /// Logs a message at DEBUG level using default logger
    65   #define LOG_DEBUG(message)
     66  #define LOG_DEBUG(message)          ;
    6667  /// Logs a message at INFO level using default logger
    67   #define LOG_INFO(message)
     68  #define LOG_INFO(message)           ;
    6869  /// Logs a message at WARN level using default logger
    69   #define LOG_WARN(message)
     70  #define LOG_WARN(message)           ;
    7071  /// Logs a message at ERROR level using default logger
    71   #define LOG_ERROR(message)
     72  #define LOG_ERROR(message)          ;
    7273  /// Logs a message at FATAL level using default logger
    73   #define LOG_FATAL(message)
     74  #define LOG_FATAL(message)          ;
    7475#endif // PACPUS_USE_LOG
    7576
Note: See TracChangeset for help on using the changeset viewer.