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_DEBUG 0x0001
49
#define TRACE_EMSG 0x0002
50
#define TRACE_FS 0x0004
51
#define TRACE_LOGIN 0x0008
52
#define TRACE_MEM 0x0010
53
#define TRACE_REQ 0x0020
54
#define TRACE_REDIR 0x0040
55
#define TRACE_RSP 0x0080
56
#define TRACE_SCHED 0x0100
57
#define TRACE_STALL 0x0200
58
59
#ifndef NODEBUG
60
61
#include "
XrdSys/XrdSysHeaders.hh
"
62
#include "
XrdOuc/XrdOucTrace.hh
"
63
64
65
extern
XrdOucTrace
*
XrdHttpTrace
;
66
extern
const
char
*
XrdHttpTraceID
;
67
68
#define TRACE(act, x) \
69
if (XrdHttpTrace->What & TRACE_ ## act) \
70
{XrdHttpTrace->Beg(XrdHttpTraceID); cerr <<x; XrdHttpTrace->End();}
71
72
#define TRACEI(act, x) \
73
if (XrdHttpTrace->What & TRACE_ ## act) \
74
{XrdHttpTrace->Beg(XrdHttpTraceID,TRACELINK->ID); cerr <<x; XrdHttpTrace->End();}
75
76
#define TRACEP(act, x) \
77
if (XrdHttpTrace->What & TRACE_ ## act) \
78
{XrdHttpTrace->Beg(XrdHttpTraceID,TRACELINK->ID,Response.ID()); cerr <<x; \
79
XrdHttpTrace->End();}
80
81
#define TRACES(act, x) \
82
if (XrdHttpTrace->What & TRACE_ ## act) \
83
{XrdHttpTrace->Beg(XrdHttpTraceID,TRACELINK->ID,(const char *)trsid); cerr <<x; \
84
XrdHttpTrace->End();}
85
86
#define TRACING(x) XrdHttpTrace->What & x
87
88
#else
89
90
#define TRACE(act,x)
91
#define TRACEI(act,x)
92
#define TRACEP(act,x)
93
#define TRACES(act,x)
94
#define TRACING(x) 0
95
#endif
96
97
#endif
XrdHttpTraceID
const char * XrdHttpTraceID
XrdOucTrace.hh
XrdHttpTrace
XrdOucTrace * XrdHttpTrace
XrdOucTrace
Definition:
XrdOucTrace.hh:35
XrdSysHeaders.hh
Generated by
1.8.17