} elseif (isset($kargs->ui_conf_id)) {
             $api_e->ui_conf_id = $kargs->ui_conf_id;
         }
         if ($multi_request) {
             // if this is not the first index - write to log
             if ($service_index == 1) {
                 storeApiEvent($session_id, $api_e);
             } else {
                 $api_e->log();
             }
             // all the rest can be written directly to the log
             // 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
     }
     }
     // this is actuall an error - it should happen very few times - maybe at the beginning of a day
     $api_e->dispatch_duration = $matches[3];
     storeApiEvent($matches[2], $api_e);
     continue;
 }
 // collect serialize_duration
 // 2009-11-29 04:23:13 [1051747326] [API] [KalturaFrontController->serializeResponse] DEBUG: Serialize took - 0.0041739940643311
 if (preg_match("/([\\d\\- \\:]*) \\[([\\d]*)].*Serialize took - ([\\d\\.]*)/", $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->serialize_duration = $matches[3];
     storeApiEvent($matches[2], $api_e);
     continue;
 }
 // 2009-11-29 04:24:16 [1522924140] [API] [global] INFO: API-end [0.067569971084595]
 if (preg_match("/([\\d\\- \\:]*) \\[([\\d]*)].*API-end \\[(.*)\\]/", $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->total_duration = $matches[3];
     // update the api_event and unset
     $api_e->log();
     unsetApiEvent($matches[2]);
     continue;
 }