source: trunk/packages/vizservers/vtkvis/Trace.h @ 2639

Last change on this file since 2639 was 2573, checked in by ldelgass, 13 years ago

Merge vtkvis_threaded branch to trunk. (Threading off by default in Makefile)

  • Property svn:eol-style set to native
File size: 971 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2011, Purdue Research Foundation
4 *
5 * Author: George A. Howlett <gah@purdue.edu>
6 */
7
8#ifndef __TRACE_H__
9#define __TRACE_H__
10
11#include <syslog.h>
12
13namespace Rappture {
14namespace VtkVis {
15
16extern void initLog();
17
18extern void closeLog();
19
20extern void logMessage(int priority, const char *funcname, const char *fileName,
21                       int lineNum, const char* format, ...);
22
23#define ERROR(...)      Rappture::VtkVis::logMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
24#ifdef WANT_TRACE
25#define TRACE(...)      Rappture::VtkVis::logMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
26#else
27#define TRACE(...)
28#endif  /*WANT_TRACE*/
29#define WARN(...)       Rappture::VtkVis::logMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
30#define INFO(...)       Rappture::VtkVis::logMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
31
32}
33}
34
35#endif
Note: See TracBrowser for help on using the repository browser.