1 #ifndef SQUID_SRC_LOGTAGS_H
2 #define SQUID_SRC_LOGTAGS_H
4 /** Squid transaction result code/tag set.
6 * These codes indicate how the request was received
7 * and some details about its processing pathway.
9 * see also http://wiki.squid-cache.org/SquidFaq/SquidLogs#Squid_result_codes
10 * for details on particular components.
16 LOG_TCP_REFRESH_UNMODIFIED
, // refresh from origin revalidated existing entry
17 LOG_TCP_REFRESH_FAIL_OLD
, // refresh from origin failed, stale reply sent
18 LOG_TCP_REFRESH_FAIL_ERR
, // refresh from origin failed, error forwarded
19 LOG_TCP_REFRESH_MODIFIED
, // refresh from origin replaced existing entry
20 LOG_TCP_CLIENT_REFRESH_MISS
,
22 LOG_TCP_SWAPFAIL_MISS
,
29 LOG_TCP_TUNNEL
, // a binary tunnel was established for this transaction
39 /// list of string representations for LogTags
40 extern const char *LogTags_str
[];
42 /// determine if the log tag code indicates a cache HIT
43 inline bool logTypeIsATcpHit(LogTags code
)
46 (code
== LOG_TCP_HIT
) ||
47 (code
== LOG_TCP_IMS_HIT
) ||
48 (code
== LOG_TCP_REFRESH_FAIL_OLD
) ||
49 (code
== LOG_TCP_REFRESH_UNMODIFIED
) ||
50 (code
== LOG_TCP_NEGATIVE_HIT
) ||
51 (code
== LOG_TCP_MEM_HIT
) ||
52 (code
== LOG_TCP_OFFLINE_HIT
);
55 /// iterator for LogTags enumeration
56 inline LogTags
&operator++ (LogTags
&aLogType
)
58 int tmp
= (int)aLogType
;
59 aLogType
= (LogTags
)(++tmp
);