Skip to content

Commit

Permalink
Print severity with message.
Browse files Browse the repository at this point in the history
  • Loading branch information
alja authored and abh3 committed Jun 30, 2016
1 parent ff56cc5 commit 64b0060
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/XrdFileCache/XrdFileCacheTrace.hh
Expand Up @@ -10,6 +10,14 @@
#define TRACE_Debug 4
#define TRACE_Dump 5


#define TRACE_STR_None ""
#define TRACE_STR_Error "error "
#define TRACE_STR_Warning "warning "
#define TRACE_STR_Info "info "
#define TRACE_STR_Debug "debug "
#define TRACE_STR_Dump "dump "

#ifndef NODEBUG

#include "XrdSys/XrdSysHeaders.hh"
Expand All @@ -21,15 +29,15 @@

#define TRACE(act, x) \
if (XRD_TRACE What >= TRACE_ ## act) \
{XRD_TRACE Beg(m_traceID); cerr <<x; XRD_TRACE End();}
{XRD_TRACE Beg(m_traceID); cerr << TRACE_STR_##act <<x; XRD_TRACE End();}

#define TRACEIO(act, x) \
if (XRD_TRACE What >= TRACE_ ## act) \
{XRD_TRACE Beg(m_traceID); cerr <<x << " " << m_io->Path(); XRD_TRACE End();}
{XRD_TRACE Beg(m_traceID); cerr << TRACE_STR_##act <<x << " " << m_io->Path(); XRD_TRACE End();}

#define TRACEF(act, x) \
if (XRD_TRACE What >= TRACE_ ## act) \
{XRD_TRACE Beg(m_traceID); cerr <<x << " " << GetLocalPath(); XRD_TRACE End();}
{XRD_TRACE Beg(m_traceID); cerr << TRACE_STR_##act << x << " " << GetLocalPath(); XRD_TRACE End();}



Expand Down

0 comments on commit 64b0060

Please sign in to comment.