Last change
on this file since 2549 was
2523,
checked in by ldelgass, 13 years ago
|
Merge 2494:2522 from trunk
|
-
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 | |
---|
13 | namespace Rappture { |
---|
14 | namespace VtkVis { |
---|
15 | |
---|
16 | extern void initLog(); |
---|
17 | |
---|
18 | extern void closeLog(); |
---|
19 | |
---|
20 | extern 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.