]> err.no Git - varnish/commitdiff
Properly log TTL calculation to shmem
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 21 Jul 2006 16:15:58 +0000 (16:15 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 21 Jul 2006 16:15:58 +0000 (16:15 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@542 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/rfc2616.c
varnish-cache/include/shmlog_tags.h

index fbf1cf4bac11de11a626d53809b518cb04d5acb0..f20ca5ee2531986a408cfb5552c822eca21650a0 100644 (file)
@@ -117,10 +117,12 @@ RFC2616_Ttl(int fd, struct http *hp, time_t t_req, time_t t_resp, struct object
 
                ttd = t_req + retirement_age;
        }
-       VSL(SLT_Debug, fd,
-           "TTD: max-age %u Age: %u Date: %d (%d) Expires %d (%d) our_clock %d"
-           " -> ttd %d (%d)",
-           u1, u2, h_date, h_date - t_req, h_expires, h_expires - t_req, t_req, ttd, ttd - t_req);
+
+       /* calculated TTL, Our time, Date, Expires, max-age, age */
+       VSL(SLT_TTL, fd, "%d %d %d %d %d %d",
+           (int)(ttd - t_req), (int)t_req, (int)h_date, (int)h_expires,
+           (int)u1, (int)u2);
+
        return (ttd);
 }
 
index e481216eac5e7c66fee392cfb513859708b898bd..78f5a13888759749bed92a457f2c1333eb9c0520 100644 (file)
@@ -32,6 +32,7 @@ SLTM(Protocol)
 SLTM(RxHeader)
 SLTM(TxHeader)
 SLTM(LostHeader)
+SLTM(TTL)
 SLTM(VCL_call)
 SLTM(VCL_trace)
 SLTM(VCL_return)