Ignore:
Timestamp:
Dec 18, 2014 5:45:38 PM (6 years ago)
Author:
ldelgass
Message:

Add command line options to set I/O file descriptors, merge some refactoring to
prep for merging threading support.

Location:
nanovis/branches/1.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nanovis/branches/1.1

  • nanovis/branches/1.1/Trace.h

    r4612 r4874  
    99#define __TRACE_H__
    1010
     11#include <string>
     12
    1113#include <GL/glew.h>
    1214#include <syslog.h>
     
    1820#define AT __FILE__ ":" NEWSTRING(__LINE__)
    1921
     22namespace nv {
     23
     24extern void logUserMessage(const char* format, ...);
     25
     26extern std::string getUserMessages();
     27
     28extern void clearUserMessages();
     29
     30extern void initLog();
     31
     32extern void closeLog();
     33
    2034extern void LogMessage(int priority, const char *funcname, const char *fileName,
    2135                       int lineNum, const char* format, ...);
    2236
    23 #define ERROR(...)      LogMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
     37#define ERROR(...)      nv::LogMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
    2438#ifdef WANT_TRACE
    25 #define TRACE(...)      LogMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
     39#define TRACE(...)      nv::LogMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
    2640#else
    2741#define TRACE(...)
    2842#endif
    29 #define WARN(...)       LogMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
    30 #define INFO(...)       LogMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
     43#define WARN(...)       nv::LogMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
     44#define INFO(...)       nv::LogMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
     45
     46#define USER_ERROR(...) nv::logUserMessage(__VA_ARGS__);
     47
     48}
    3149
    3250extern bool CheckFBO(GLenum *status);
    3351extern void PrintFBOStatus(GLenum status, const char *prefix);
    3452extern bool CheckGL(const char *prefix);
     53
    3554#endif
Note: See TracChangeset for help on using the changeset viewer.