// inc the service_index
                $service_index++;
            } else {
                // no need to loop
                storeApiEvent($session_id, $api_e);
                break;
            }
        }
        $ps2_lines++;
        continue;
    }
    // status - closuer
    // 125965956955.03, Dec 01 04:26:09 symfony [info] {sfResponse} send status "HTTP/1.0 200 OK"
    if (preg_match("/([\\d\\.]*), ([a-zA-Z\\d\\- \\:]*) symfony.*status \"HTTP\\/[\\d\\.]* ([\\d]*)/s", $s, $matches)) {
        $session_id = $matches[1];
        $api_e = getApiEvent($session_id);
        if (!$api_e) {
            continue;
            // this is actuall an error - it should happen very few times - maybe at the beginning of a day
        }
        $api_e->result = $matches[3];
        // update the api_event and unset
        $api_e->log();
        unsetApiEvent($session_id);
        continue;
    }
    $ignored_lines++;
}
$partial_events = count($open_events);
//
foreach ($open_events as $ev) {
    }
    // collect exceptions
    // 2009-11-29 04:24:16 [520451400] [API] [KalturaFrontController->getExceptionObject] ERR: exception 'KalturaAPIException' with message 'Entry id "zt6jfpo0f4" not found' in /opt/k
    if (preg_match("/([\\d\\- \\:]*) \\[([\\d]*)].* ERR: exception (.*)/ms", $s, $matches)) {
        $api_e = getApiEvent($matches[2]);
        if (!$api_e) {
            continue;
        }
        // this is actuall an error - it should happen very few times - maybe at the beginning of a day
        $api_e->exception = $matches[3];
        // update the api_event and unset
        continue;
    }
    // 2009-11-29 04:24:16 [520451400] [API] [global] DEBUG: <------------------------------------- api_v3 -------------------------------------
    if (preg_match("/([\\d\\- \\:]*) \\[([\\d]*)].*<-------/", $s, $matches)) {
        $api_e = getApiEvent($matches[2]);
        if (!$api_e) {
            continue;
        }
        // unset
        unsetApiEvent($matches[2]);
        continue;
    }
}
$partial_events = count($open_events);
//
foreach ($open_events as $ev) {
    $ev->result = "???";
    // didn't have an ending line
    $ev->log();
}