source: vtkvis/branches/1.7/Trace.h @ 4605

Last change on this file since 4605 was 4605, checked in by ldelgass, 10 years ago

Merge crash fix from r4422 in trunk

  • Property svn:eol-style set to native
File size: 1.1 KB
RevLine 
[2100]1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
[3177]3 * Copyright (C) 2004-2012  HUBzero Foundation, LLC
[2100]4 *
[2506]5 * Author: George A. Howlett <gah@purdue.edu>
[2100]6 */
7
[3615]8#ifndef VTKVIS_TRACE_H
9#define VTKVIS_TRACE_H
[2100]10
[4605]11#include <string>
12
[2100]13#include <syslog.h>
14
15namespace VtkVis {
16
[3360]17extern void logUserMessage(const char* format, ...);
18
[4605]19extern std::string getUserMessages();
[3360]20
21extern void clearUserMessages();
22
[2573]23extern void initLog();
[2100]24
[2573]25extern void closeLog();
[2100]26
[2573]27extern void logMessage(int priority, const char *funcname, const char *fileName,
28                       int lineNum, const char* format, ...);
[2100]29
[3615]30#define ERROR(...)      VtkVis::logMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
[2100]31#ifdef WANT_TRACE
[3615]32#define TRACE(...)      VtkVis::logMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
[2100]33#else
34#define TRACE(...)
[2573]35#endif  /*WANT_TRACE*/
[3615]36#define WARN(...)       VtkVis::logMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
37#define INFO(...)       VtkVis::logMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
[2100]38
[3615]39#define USER_ERROR(...) VtkVis::logUserMessage(__VA_ARGS__)
[3360]40
[2100]41}
42
43#endif
Note: See TracBrowser for help on using the repository browser.