2 * Copyright (C) 1996-2017 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",
43 * This method is documented in http://wiki.squid-cache.org/SquidFaq/SquidLogs#Squid_result_codes
44 * Please keep the wiki up to date
47 LogTags::c_str() const
49 static char buf
[1024];
54 if (oldType
&& oldType
< LOG_TYPE_MAX
)
55 pos
+= snprintf(buf
, sizeof(buf
), "%s",Str_
[oldType
]);
57 pos
+= snprintf(buf
, sizeof(buf
), "NONE");
60 pos
+= snprintf(buf
+pos
,sizeof(buf
)-pos
, "_IGNORED");
64 pos
+= snprintf(buf
+pos
,sizeof(buf
)-pos
, "_TIMEDOUT");
66 pos
+= snprintf(buf
+pos
,sizeof(buf
)-pos
, "_ABORTED");
72 LogTags::isTcpHit() const
75 (oldType
== LOG_TCP_HIT
) ||
76 (oldType
== LOG_TCP_IMS_HIT
) ||
77 (oldType
== LOG_TCP_INM_HIT
) ||
78 (oldType
== LOG_TCP_REFRESH_FAIL_OLD
) ||
79 (oldType
== LOG_TCP_REFRESH_UNMODIFIED
) ||
80 (oldType
== LOG_TCP_NEGATIVE_HIT
) ||
81 (oldType
== LOG_TCP_MEM_HIT
) ||
82 (oldType
== LOG_TCP_OFFLINE_HIT
);