source: trunk/packages/vizservers/nanovis/Trace.h @ 3605

Last change on this file since 3605 was 3605, checked in by ldelgass, 11 years ago

Add writer thread to nanovis (set USE_THREADS in Makefile), more refactoring.

  • Property svn:eol-style set to native
File size: 1.3 KB
RevLine 
[2798]1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
[3452]2/*
3 * Copyright (C) 2004-2013  HUBzero Foundation, LLC
4 *
5 * Author: George A. Howlett <gah@purdue.edu>
6 */
7
[848]8#ifndef __TRACE_H__
9#define __TRACE_H__
10
[1199]11#include <GL/glew.h>
[1991]12#include <syslog.h>
[1199]13
[2841]14#include "config.h"
15
[1429]16#define MAKE_STRING(x) #x
17#define NEWSTRING(x) MAKE_STRING(x)
18#define AT __FILE__ ":" NEWSTRING(__LINE__)
19
[3605]20namespace nv {
21
22extern void logUserMessage(const char* format, ...);
23
24extern const char *getUserMessages();
25
26extern void clearUserMessages();
27
28extern void initLog();
29
30extern void closeLog();
31
[3452]32extern void LogMessage(int priority, const char *funcname, const char *fileName,
33                       int lineNum, const char* format, ...);
[1984]34
[3605]35#define ERROR(...)      nv::LogMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
[1984]36#ifdef WANT_TRACE
[3605]37#define TRACE(...)      nv::LogMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
[1984]38#else
39#define TRACE(...)
40#endif
[3605]41#define WARN(...)       nv::LogMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
42#define INFO(...)       nv::LogMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
[1984]43
[3605]44#define USER_ERROR(...) nv::logUserMessage(__VA_ARGS__)
45
46}
47
[3597]48extern bool CheckFBO(GLenum *status);
[1200]49extern void PrintFBOStatus(GLenum status, const char *prefix);
50extern bool CheckGL(const char *prefix);
[3605]51
[848]52#endif
Note: See TracBrowser for help on using the repository browser.