source: trunk/packages/vizservers/geovis/Trace.h @ 3998

Last change on this file since 3998 was 3998, checked in by ldelgass, 8 years ago

Add prelimilary skeleton for geovis map rendering server. Not functional, not
integrated into configure, etc.

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 GEOVIS_TRACE_H
9#define GEOVIS_TRACE_H
10
11#include <syslog.h>
12
13namespace GeoVis {
14
15extern void logUserMessage(const char* format, ...);
16
17extern const char *getUserMessages();
18
19extern void clearUserMessages();
20
21extern void initLog();
22
23extern void closeLog();
24
25extern void logMessage(int priority, const char *funcname, const char *fileName,
26                       int lineNum, const char* format, ...);
27
28#define ERROR(...)      GeoVis::logMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
29#ifdef WANT_TRACE
30#define TRACE(...)      GeoVis::logMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
31#else
32#define TRACE(...)
33#endif  /*WANT_TRACE*/
34#define WARN(...)       GeoVis::logMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
35#define INFO(...)       GeoVis::logMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
36
37#define USER_ERROR(...) GeoVis::logUserMessage(__VA_ARGS__)
38
39}
40
41#endif
Note: See TracBrowser for help on using the repository browser.