Changeset 112 in pacpusframework for trunk/include/Pacpus


Ignore:
Timestamp:
Jun 17, 2013, 10:16:02 AM (11 years ago)
Author:
Marek Kurdej
Message:

Update: Log.h: macro minor changes.

File:
1 edited

Legend:

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

    r109 r112  
    4444
    4545  /* 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)
     46  #define LOG_TRACE(message)          do{LOG4CXX_TRACE(logger, message);} while(false)
     47  #define LOG_DEBUG(message)          do{LOG4CXX_DEBUG(logger, message);} while(false)
     48  #define LOG_INFO(message)           do{LOG4CXX_INFO(logger, message);} while(false)
     49  #define LOG_WARN(message)           do{LOG4CXX_WARN(logger, message);} while(false)
     50  #define LOG_ERROR(message)          do{LOG4CXX_ERROR(logger, message);} while(false)
     51  #define LOG_FATAL(message)          do{LOG4CXX_FATAL(logger, message);} while(false)
    5252
    5353  /// Output stream ::log4cxx::helpers::CharMessageBuffer operator for QString
     
    6262  #define DECLARE_STATIC_LOGGER(name)
    6363  /// Logs a message at TRACE level using default logger
    64   #define LOG_TRACE(message)          do{;}while(0)
     64  #define LOG_TRACE(message)          do{;} while(false)
    6565  /// Logs a message at DEBUG level using default logger
    66   #define LOG_DEBUG(message)          do{;}while(0)
     66  #define LOG_DEBUG(message)          do{;} while(false)
    6767  /// Logs a message at INFO level using default logger
    68   #define LOG_INFO(message)           do{;}while(0)
     68  #define LOG_INFO(message)           do{;} while(false)
    6969  /// Logs a message at WARN level using default logger
    70   #define LOG_WARN(message)           do{;}while(0)
     70  #define LOG_WARN(message)           do{;} while(false)
    7171  /// Logs a message at ERROR level using default logger
    72   #define LOG_ERROR(message)          do{;}while(0)
     72  #define LOG_ERROR(message)          do{;} while(false)
    7373  /// Logs a message at FATAL level using default logger
    74   #define LOG_FATAL(message)          do{;}while(0)
     74  #define LOG_FATAL(message)          do{;} while(false)
    7575#endif // PACPUS_USE_LOG
    7676
Note: See TracChangeset for help on using the changeset viewer.