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

Last change on this file since 3464 was 3452, checked in by ldelgass, 7 years ago

Remove XINETD define from nanovis. We only support server mode now, no glut
interaction loop with mouse/keyboard handlers. Fixes for trace logging to make
output closer to vtkvis: inlcude function name for trace messages, remove
newlines from format strings in macros since newlines get added by syslog.

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2004-2013  HUBzero Foundation, LLC
4 *
5 * Author: George A. Howlett <gah@purdue.edu>
6 */
7
8#ifndef __TRACE_H__
9#define __TRACE_H__
10
11#include <GL/glew.h>
12#include <syslog.h>
13
14#include "config.h"
15
16#define MAKE_STRING(x) #x
17#define NEWSTRING(x) MAKE_STRING(x)
18#define AT __FILE__ ":" NEWSTRING(__LINE__)
19
20extern void LogMessage(int priority, const char *funcname, const char *fileName,
21                       int lineNum, const char* format, ...);
22
23#define ERROR(...)      LogMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
24#ifdef WANT_TRACE
25#define TRACE(...)      LogMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
26#else
27#define TRACE(...)
28#endif
29#define WARN(...)       LogMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
30#define INFO(...)       LogMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
31
32extern bool CheckFBO(GLenum *statusPtr);
33extern void PrintFBOStatus(GLenum status, const char *prefix);
34extern bool CheckGL(const char *prefix);
35#endif
Note: See TracBrowser for help on using the repository browser.