#!/usr/bin/perl -w
+#
+## Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
# Reads cache.log and displays lines that correspond to a given async job.
#
my $entering;
while (<>) {
- $entering = $_ if !$inside && /\| entering\b/;
- undef $entering if /\| leaving\b/;
+ $entering = $_ if !$inside && /[|:] entering\b/;
+ undef $entering if /[|:] leaving\b/;
# if (!$inside && /\bcalled\b.*\b$XactId\b/o) {
if (!$inside && /\bstatus in\b.*\b$XactId\b/o) {
# if (/\bended\b.*\b$XactId\b/o || /\bswan\s+sang\b.*\b$XactId\b/o) {
# if (/\bstatus out\b.*\b$XactId\b/o || /\bswan\s+sang\b.*\b$XactId\b/o ||
- if (/\| leaving\b/) {
+ if (/[|:] leaving\b/) {
print "\n";
$inside = 0;
}