xrootd
Loading...
Searching...
No Matches
XrdSutTrace.hh
Go to the documentation of this file.
1#ifndef ___SUT_TRACE_H___
2#define ___SUT_TRACE_H___
3/******************************************************************************/
4/* */
5/* X r d S u t T r a c e . h h */
6/* */
7/* (C) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* Produced by Gerri Ganis for CERN */
9/* */
10/* This file is part of the XRootD software suite. */
11/* */
12/* XRootD is free software: you can redistribute it and/or modify it under */
13/* the terms of the GNU Lesser General Public License as published by the */
14/* Free Software Foundation, either version 3 of the License, or (at your */
15/* option) any later version. */
16/* */
17/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
18/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
19/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
20/* License for more details. */
21/* */
22/* You should have received a copy of the GNU Lesser General Public License */
23/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
24/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
25/* */
26/* The copyright holder's institutional names and contributor's names may not */
27/* be used to endorse or promote products derived from this software without */
28/* specific prior written permission of the institution or contributor. */
29/******************************************************************************/
30
31#ifndef ___OUC_TRACE_H___
32#include "XrdOuc/XrdOucTrace.hh"
33#endif
34#ifndef ___SUT_AUX_H___
35#include "XrdSut/XrdSutAux.hh"
36#endif
37
38#ifndef NODEBUG
39
41
42#define QTRACE(act) (sutTrace && (sutTrace->What & sutTRACE_ ## act))
43#define PRINT(y) {if (sutTrace) {sutTrace->Beg(epname); \
44 std::cerr <<y; sutTrace->End();}}
45#define TRACE(act,x) if (QTRACE(act)) PRINT(x)
46#define DEBUG(y) TRACE(Debug,y)
47#define EPNAME(x) static const char *epname = x;
48
49#else
50
51#define QTRACE(x)
52#define PRINT(x)
53#define TRACE(x,y)
54#define DEBUG(x)
55#define EPNAME(x)
56
57#endif
58
59//
60// For error logging and tracing
61extern XrdOucTrace *sutTrace;
62
63#endif
XrdOucTrace * sutTrace
Definition XrdOucTrace.hh:36