Ignore:
Timestamp:
Dec 8, 2010, 9:06:20 PM (9 years ago)
Author:
gah
Message:

Clean up debugging/printing traces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/Trace.h

    r1984 r1991  
    44#include <GL/glew.h>
    55#include <GL/glut.h>
     6#include <syslog.h>
    67
    78#define MAKE_STRING(x) #x
     
    910#define AT __FILE__ ":" NEWSTRING(__LINE__)
    1011
    11 extern void PrintMessage(const char *mesg, const char *fileName, int lineNum,
     12extern void LogMessage(int priority, const char *fileName, int lineNum,
    1213                         const char* format, ...);
    1314
    14 #define ERROR(...)      PrintMessage("Error", __FILE__, __LINE__, __VA_ARGS__)
     15#define ERROR(...)      LogMessage(LOG_ERR, __FILE__, __LINE__, __VA_ARGS__)
    1516#ifdef WANT_TRACE
    16 #define TRACE(...)      PrintMessage("Trace", __FILE__, __LINE__, __VA_ARGS__)
     17#define TRACE(...)      LogMessage(LOG_DEBUG, __FILE__, __LINE__, __VA_ARGS__)
    1718#else
    1819#define TRACE(...)
    1920#endif
    20 #define WARN(...)       PrintMessage("Warning", __FILE__, __LINE__, __VA_ARGS__)
    21 #define INFO(...)       PrintMessage("Info", __FILE__, __LINE__, __VA_ARGS__)
     21#define WARN(...)       LogMessage(LOG_WARNING, __FILE__, __LINE__, __VA_ARGS__)
     22#define INFO(...)       LogMessage(LOG_INFO, __FILE__, __LINE__, __VA_ARGS__)
    2223
    2324
Note: See TracChangeset for help on using the changeset viewer.