]> err.no Git - varnish/commitdiff
When DIAGNOSTICS is defined, log every step that each session goes through,
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 30 Oct 2007 14:06:37 +0000 (14:06 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 30 Oct 2007 14:06:37 +0000 (14:06 +0000)
along with some vital statistics, and flush the log regularly.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2215 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_center.c

index fdd889a76194bd49f98ce75601c523fe2d4ce494..f92d74b9bdacc0c6ff9fa75bbf8964db27a49dea 100644 (file)
@@ -877,7 +877,21 @@ CNT_Session(struct sess *sp)
                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();