Roxen.git
/
server
/
etc
/
include
/
request_trace.h
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/etc/include/request_trace.h:1:
// -*- pike -*- // // Some stuff to do logging of a request through the server. //
-
// $Id: request_trace.h,v 1.
14
2008/09/
03
16
:
14
:
28
jonasw
Exp $
+
// $Id: request_trace.h,v 1.
15
2008/09/
26
10
:
19
:
16
mast
Exp $
#ifndef REQUEST_TRACE_H #define REQUEST_TRACE_H #include <roxen.h> #include <module.h> // Note that TRACE_ENTER (and TRACE_LEAVE) takes message strings // in plain text. Messages are preferably a single line, and they // should not end with period and/or newline.
Roxen.git/server/etc/include/request_trace.h:43:
if(id && \ (_trace_leave = \ [function(string:void)]([mapping(string:mixed)]id->misc)-> \ trace_leave)) \ _trace_leave(A); \ }while(0) #endif // SIMPLE_TRACE_ENTER and SIMPLE_TRACE_LEAVE are simpler variants of
-
// the above macros
:
They
handle sprintf style format lists
and don't
-
//
take html encoded messages. Note
the reversed argument order in
-
//
SIMPLE_TRACE_ENTER compared to TRACE_ENTER.
+
// the above macros
since
they
handle sprintf style format lists
.
Note
+
// the reversed argument order in SIMPLE_TRACE_ENTER compared to
+
//
TRACE_ENTER.
#define SIMPLE_TRACE_ENTER(OBJ, MSG...) do { \ array _msg_arr_; \ TRACE_ENTER ( (_msg_arr_ = ({MSG}), \ sizeof (_msg_arr_) > 1 ? sprintf (@_msg_arr_) : \ (sizeof (_msg_arr_) ? _msg_arr_[0] : "")), \ (OBJ)); \ } while (0) #define SIMPLE_TRACE_LEAVE(MSG...) do { \
Roxen.git/server/etc/include/request_trace.h:67:
TRACE_LEAVE ( (_msg_arr_ = ({MSG}), \ sizeof (_msg_arr_) > 1 ? sprintf (@_msg_arr_) : \ (sizeof (_msg_arr_) ? _msg_arr_[0] : ""))); \ } while (0) // The following variant should be used inside RXML.Frame callbacks // such as do_enter. In addition to the request trace, it does rxml // debug logging which is activated with the DEBUG define in // combination with the magic _debug_ tag argument or the RXML_VERBOSE // or RXML_REQUEST_VERBOSE defines.
-
//
-
// These two macros do not take html encoded messages (which since 5.0
-
// is true for all tracing macros).
+
#define TAG_TRACE_ENTER(MSG...) do { \ array _msg_arr_; \ string _msg_; \ TRACE_ENTER ("tag <" + (tag && tag->name) + "> " + \ (_msg_arr_ = ({MSG}), \ _msg_ = sizeof (_msg_arr_) > 1 ? sprintf (@_msg_arr_) : \ (sizeof (_msg_arr_) ? _msg_arr_[0] : "")), \ tag); \ DO_IF_DEBUG ( \