Changeset 146

Show
Ignore:
Timestamp:
03/12/09 16:50:20 (15 years ago)
Author:
bhilburn
Message:

The DEBUG and LOG functions now support a variable number of arguments.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vtcross/branches/bhilburn/src/include/vtcross/debug.h

    r144 r146  
    1111#define DEBUG_H 
    1212 
    13 #include <iostream> 
     13#include <cstdio> 
    1414 
    1515extern bool VTCROSS_DEBUG; 
    1616 
    17 #define DEBUG(class, msg) \ 
     17#define DEBUG(...) \ 
    1818    if(VTCROSS_DEBUG) \ 
    19         std::cout << #class << ": " << msg << std::endl; 
     19        fprintf(stderr, __VA_ARGS__); 
    2020 
    21 #define LOG(function, msg) \ 
    22     std::cout << #function << ": " << msg << std::endl; 
     21#define LOG(...) \ 
     22    fprintf(stdout, __VA_ARGS__); 
    2323 
    2424#endif