2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
12 // old deprecated tag strings
13 const char * LogTags::Str_
[] = {
17 "TCP_REFRESH_UNMODIFIED",
18 "TCP_REFRESH_FAIL_OLD",
19 "TCP_REFRESH_FAIL_ERR",
20 "TCP_REFRESH_MODIFIED",
22 "TCP_CLIENT_REFRESH_MISS",
42 * This method is documented in http://wiki.squid-cache.org/SquidFaq/SquidLogs#Squid_result_codes
43 * Please keep the wiki up to date
46 LogTags::c_str() const
48 static char buf
[1024];
53 if (oldType
&& oldType
< LOG_TYPE_MAX
)
54 pos
+= snprintf(buf
, sizeof(buf
), "%s",Str_
[oldType
]);
56 pos
+= snprintf(buf
, sizeof(buf
), "NONE");
59 pos
+= snprintf(buf
+pos
,sizeof(buf
)-pos
, "_IGNORED");
63 pos
+= snprintf(buf
+pos
,sizeof(buf
)-pos
, "_TIMEDOUT");
65 pos
+= snprintf(buf
+pos
,sizeof(buf
)-pos
, "_ABORTED");
71 LogTags::isTcpHit() const
74 (oldType
== LOG_TCP_HIT
) ||
75 (oldType
== LOG_TCP_IMS_HIT
) ||
76 (oldType
== LOG_TCP_REFRESH_FAIL_OLD
) ||
77 (oldType
== LOG_TCP_REFRESH_UNMODIFIED
) ||
78 (oldType
== LOG_TCP_NEGATIVE_HIT
) ||
79 (oldType
== LOG_TCP_MEM_HIT
) ||
80 (oldType
== LOG_TCP_OFFLINE_HIT
);