r2215 - trunk/varnish-cache/bin/varnishd
des at projects.linpro.no
des at projects.linpro.no
Tue Oct 30 15:06:38 CET 2007
Author: des
Date: 2007-10-30 15:06:37 +0100 (Tue, 30 Oct 2007)
New Revision: 2215
Modified:
trunk/varnish-cache/bin/varnishd/cache_center.c
Log:
When DIAGNOSTICS is defined, log every step that each session goes through,
along with some vital statistics, and flush the log regularly.
Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-10-30 14:02:58 UTC (rev 2214)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-10-30 14:06:37 UTC (rev 2215)
@@ -877,7 +877,21 @@
CHECK_OBJ_ORNULL(sp->backend, BACKEND_MAGIC);
switch (sp->step) {
-#define STEP(l,u) case STP_##u: done = cnt_##l(sp); break;
+#ifdef DIAGNOSTICS
+#define STEP(l,u) \
+ case STP_##u: \
+ WSL(sp->wrk, SLT_Debug, sp->id, \
+ "cnt_%s(%p) xid %x obj %p vcl %p", \
+ #l, sp, sp->xid, sp->obj, sp->vcl); \
+ WSL_Flush(sp->wrk); \
+ done = cnt_##l(sp); \
+ break;
+#else
+#define STEP(l,u) \
+ case STP_##u: \
+ done = cnt_##l(sp); \
+ break;
+#endif
#include "steps.h"
#undef STEP
default: INCOMPL();
More information about the varnish-commit
mailing list