xrootd
src
XrdHttp
XrdHttpTrace.hh
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// This file is part of XrdHTTP: A pragmatic implementation of the
3
// HTTP/WebDAV protocol for the Xrootd framework
4
//
5
// Copyright (c) 2013 by European Organization for Nuclear Research (CERN)
6
// Author: Fabrizio Furano <furano@cern.ch>
7
// File Date: Nov 2012
8
//------------------------------------------------------------------------------
9
// XRootD is free software: you can redistribute it and/or modify
10
// it under the terms of the GNU Lesser General Public License as published by
11
// the Free Software Foundation, either version 3 of the License, or
12
// (at your option) any later version.
13
//
14
// XRootD is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
// GNU General Public License for more details.
18
//
19
// You should have received a copy of the GNU Lesser General Public License
20
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
21
//------------------------------------------------------------------------------
22
23
24
25
26
27
28
29
30
41
#ifndef _XROOTD_TRACE_H
42
#define _XROOTD_TRACE_H
43
44
45
// Trace flags
46
//
47
#define TRACE_ALL 0x0fff
48
#define TRACE_AUTH 0x0001
49
#define TRACE_DEBUG 0x0002
50
#define TRACE_MEM 0x0010
51
#define TRACE_REQ 0x0020
52
#define TRACE_REDIR 0x0040
53
#define TRACE_RSP 0x0080
54
55
#ifndef NODEBUG
56
57
#include "
XrdSys/XrdSysHeaders.hh
"
58
#include "
XrdOuc/XrdOucTrace.hh
"
59
60
61
extern
XrdOucTrace
*
XrdHttpTrace
;
62
extern
const
char
*
XrdHttpTraceID
;
63
64
#define TRACE(act, x) \
65
if (XrdHttpTrace->What & TRACE_ ## act) \
66
{XrdHttpTrace->Beg(XrdHttpTraceID); cerr <<x; XrdHttpTrace->End();}
67
68
#define TRACEI(act, x) \
69
if (XrdHttpTrace->What & TRACE_ ## act) \
70
{XrdHttpTrace->Beg(XrdHttpTraceID,TRACELINK->ID); cerr <<x; XrdHttpTrace->End();}
71
72
#define TRACEP(act, x) \
73
if (XrdHttpTrace->What & TRACE_ ## act) \
74
{XrdHttpTrace->Beg(XrdHttpTraceID,TRACELINK->ID,Response.ID()); cerr <<x; \
75
XrdHttpTrace->End();}
76
77
#define TRACES(act, x) \
78
if (XrdHttpTrace->What & TRACE_ ## act) \
79
{XrdHttpTrace->Beg(XrdHttpTraceID,TRACELINK->ID,(const char *)trsid); cerr <<x; \
80
XrdHttpTrace->End();}
81
82
#define TRACING(x) XrdHttpTrace->What & x
83
#define EPNAME(x) static const char* epname = x;
84
85
#else
86
87
#define TRACE(act,x)
88
#define TRACEI(act,x)
89
#define TRACEP(act,x)
90
#define TRACES(act,x)
91
#define TRACING(x) 0
92
#define EPNAME(x)
93
#endif
94
95
#endif
XrdHttpTraceID
const char * XrdHttpTraceID
XrdOucTrace.hh
XrdHttpTrace
XrdOucTrace * XrdHttpTrace
XrdOucTrace
Definition:
XrdOucTrace.hh:36
XrdSysHeaders.hh
Generated by
1.8.20