当前位置: 首页>>代码示例>>PHP>>正文


PHP KalturaLog::info方法代码示例

本文整理汇总了PHP中KalturaLog::info方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaLog::info方法的具体用法?PHP KalturaLog::info怎么用?PHP KalturaLog::info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KalturaLog的用法示例。


在下文中一共展示了KalturaLog::info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run($jobs = null)
 {
     KalturaLog::info("Validating live media servers");
     $filter = new KalturaLiveStreamEntryFilter();
     $filter->isLive = KalturaNullableBoolean::TRUE_VALUE;
     $filter->orderBy = KalturaLiveStreamEntryOrderBy::CREATED_AT_ASC;
     $filter->moderationStatusIn = KalturaEntryModerationStatus::PENDING_MODERATION . ',' . KalturaEntryModerationStatus::APPROVED . ',' . KalturaEntryModerationStatus::REJECTED . ',' . KalturaEntryModerationStatus::FLAGGED_FOR_REVIEW . ',' . KalturaEntryModerationStatus::AUTO_APPROVED;
     $pager = new KalturaFilterPager();
     $pager->pageSize = 500;
     $pager->pageIndex = 1;
     $entries = self::$kClient->liveStream->listAction($filter, $pager);
     while (count($entries->objects)) {
         foreach ($entries->objects as $entry) {
             try {
                 /* @var $entry KalturaLiveEntry */
                 self::impersonate($entry->partnerId);
                 self::$kClient->liveStream->validateRegisteredMediaServers($entry->id);
                 self::unimpersonate();
                 $filter->createdAtGreaterThanOrEqual = $entry->createdAt;
             } catch (KalturaException $e) {
                 self::unimpersonate();
                 KalturaLog::err("Caught exception with message [" . $e->getMessage() . "]");
             }
         }
         $pager->pageIndex++;
         $entries = self::$kClient->liveStream->listAction($filter, $pager);
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:28,代码来源:KAsyncValidateLiveMediaServers.class.php

示例2: startBulkUpload

 /**
  * 
  * Starts the bulk upload
  * @param KalturaBatchJob $job
  */
 private function startBulkUpload(KalturaBatchJob $job)
 {
     KalturaLog::info("Start bulk upload ({$job->id})");
     //Gets the right Engine instance
     $engine = KBulkUploadEngine::getEngine($job->jobSubType, $job);
     if (is_null($engine)) {
         throw new KalturaException("Unable to find bulk upload engine", KalturaBatchJobAppErrors::ENGINE_NOT_FOUND);
     }
     $job = $this->updateJob($job, 'Parsing file [' . $engine->getName() . ']', KalturaBatchJobStatus::QUEUED, $engine->getData());
     $engine->setJob($job);
     $engine->setData($job->data);
     $engine->handleBulkUpload();
     $job = $engine->getJob();
     $data = $engine->getData();
     $countObjects = $this->countCreatedObjects($job->id, $job->data->bulkUploadObjectType);
     $countHandledObjects = $countObjects[0];
     $countErrorObjects = $countObjects[1];
     if (!$countHandledObjects && !$engine->shouldRetry() && $countErrorObjects) {
         throw new KalturaBatchException("None of the uploaded items were processed succsessfuly", KalturaBatchJobAppErrors::BULK_NO_ENTRIES_HANDLED, $engine->getData());
     }
     if ($engine->shouldRetry()) {
         self::$kClient->batch->resetJobExecutionAttempts($job->id, $this->getExclusiveLockKey(), $job->jobType);
         return $this->closeJob($job, null, null, "Retrying: " . $countHandledObjects . " " . $engine->getObjectTypeTitle() . " objects were handled untill now", KalturaBatchJobStatus::RETRY);
     }
     return $this->closeJob($job, null, null, 'Waiting for objects closure', KalturaBatchJobStatus::ALMOST_DONE, $data);
 }
开发者ID:DBezemer,项目名称:server,代码行数:31,代码来源:KAsyncBulkUpload.class.php

示例3: run

 public function run($jobs = null)
 {
     if (KBatchBase::$taskConfig->isInitOnly()) {
         return $this->init();
     }
     if (is_null($jobs)) {
         $jobs = KBatchBase::$kClient->batch->getExclusiveAlmostDone($this->getExclusiveLockKey(), KBatchBase::$taskConfig->maximumExecutionTime, $this->getMaxJobsEachRun(), $this->getFilter(), static::getType());
     }
     KalturaLog::info(count($jobs) . " jobs to close");
     if (!count($jobs) > 0) {
         KalturaLog::info("Queue size: 0 sent to scheduler");
         $this->saveSchedulerQueue(static::getType());
         return null;
     }
     foreach ($jobs as &$job) {
         try {
             self::setCurrentJob($job);
             $job = $this->exec($job);
         } catch (KalturaException $kex) {
             KBatchBase::unimpersonate();
             $job = $this->closeJob($job, KalturaBatchJobErrorTypes::KALTURA_API, $kex->getCode(), "Error: " . $kex->getMessage(), KalturaBatchJobStatus::FAILED);
         } catch (KalturaClientException $kcex) {
             KBatchBase::unimpersonate();
             $job = $this->closeJob($job, KalturaBatchJobErrorTypes::KALTURA_CLIENT, $kcex->getCode(), "Error: " . $kcex->getMessage(), KalturaBatchJobStatus::RETRY);
         } catch (Exception $ex) {
             KBatchBase::unimpersonate();
             $job = $this->closeJob($job, KalturaBatchJobErrorTypes::RUNTIME, $ex->getCode(), "Error: " . $ex->getMessage(), KalturaBatchJobStatus::FAILED);
         }
         self::unsetCurrentJob();
     }
     return $jobs;
 }
开发者ID:DBezemer,项目名称:server,代码行数:32,代码来源:KJobCloserWorker.class.php

示例4: deleteFilesPHP

 protected function deleteFilesPHP($searchPath, $minutesOld, $simulateOnly)
 {
     $secondsOld = $minutesOld * 60;
     $files = glob($searchPath);
     KalturaLog::info("Found [" . count($files) . "] to scan");
     $now = time();
     KalturaLog::info("Deleting files that are " . $secondsOld . " seconds old (modified before " . date('c', $now - $secondsOld) . ")");
     $deletedCount = 0;
     foreach ($files as $file) {
         $filemtime = filemtime($file);
         if ($filemtime > $now - $secondsOld) {
             continue;
         }
         if ($simulateOnly) {
             KalturaLog::info("Simulating: Deleting file [{$file}], it's last modification time was " . date('c', $filemtime));
             continue;
         }
         KalturaLog::info("Deleting file [{$file}], it's last modification time was " . date('c', $filemtime));
         $res = @unlink($file);
         if (!$res) {
             KalturaLog::err("Error: problem while deleting [{$file}]");
             continue;
         }
         $deletedCount++;
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:26,代码来源:KAsyncDirectoryCleanup.class.php

示例5: parseCreatedFiles

 protected function parseCreatedFiles()
 {
     $xmlPath = $this->outDir . DIRECTORY_SEPARATOR . $this->destFileName . '.ism';
     KalturaLog::info("Parse created files from ism[{$xmlPath}]");
     // in case of wma
     if (!file_exists($xmlPath)) {
         KalturaLog::info("ism file[{$xmlPath}] doesn't exist");
         $wmaPath = $this->outDir . DIRECTORY_SEPARATOR . $this->destFileName . '.wma';
         if (file_exists($wmaPath)) {
             KalturaLog::info("wma file[{$wmaPath}] found");
             $this->outFilesPath[0] = $wmaPath;
         }
         return;
     }
     $xml = file_get_contents($xmlPath);
     $xml = mb_convert_encoding($xml, 'ASCII', 'UTF-16');
     KalturaLog::debug("ism content:\n{$xml}");
     $arr = null;
     if (preg_match('/(<smil[\\s\\w\\W]+<\\/smil>)/', $xml, $arr)) {
         $xml = $arr[1];
     }
     file_put_contents($xmlPath, $xml);
     //echo $xml;
     $doc = new DOMDocument();
     $doc->loadXML($xml);
     $videoEntities = $doc->getElementsByTagName('video');
     foreach ($videoEntities as $videoEntity) {
         $src = $this->outDir . DIRECTORY_SEPARATOR . $videoEntity->getAttribute("src");
         $bitrate = $videoEntity->getAttribute("systemBitrate") / 1000;
         KalturaLog::info("Media found in ism bitrate[{$bitrate}] source[{$src}]");
         $this->outFilesPath[$bitrate] = $src;
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:33,代码来源:KOperationEngineExpressionEncoder3.php

示例6: doFromObject

 public function doFromObject($dbObject, KalturaDetachedResponseProfile $responseProfile = null)
 {
     parent::doFromObject($dbObject, $responseProfile);
     /* @var $dbObject kEmailNotificationCategoryRecipientProvider */
     $categoryIdFieldType = get_class($dbObject->getCategoryId());
     KalturaLog::info("Retrieving API object for categoryId fild of type [{$categoryIdFieldType}]");
     switch ($categoryIdFieldType) {
         case 'kObjectIdField':
             $this->categoryId = new KalturaObjectIdField();
             break;
         case 'kEvalStringField':
             $this->categoryId = new KalturaEvalStringField();
             break;
         case 'kStringValue':
             $this->categoryId = new KalturaStringValue();
             break;
         default:
             $this->categoryId = KalturaPluginManager::loadObject('KalturaStringValue', $categoryIdFieldType);
             break;
     }
     if ($this->categoryId) {
         $this->categoryId->fromObject($dbObject->getCategoryId());
     }
     if ($dbObject->getCategoryUserFilter()) {
         $this->categoryUserFilter = new KalturaCategoryUserProviderFilter();
         $this->categoryUserFilter->fromObject($dbObject->getCategoryUserFilter());
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:28,代码来源:KalturaEmailNotificationCategoryRecipientProvider.php

示例7: call

 private function call($method, $args = array())
 {
     KalturaLog::info("Call [{$method}] args [" . print_r($args, true) . "]");
     $result = $this->api->call($method, $args);
     KalturaLog::info("Result [" . print_r($result, true) . "]");
     return $result;
 }
开发者ID:DBezemer,项目名称:server,代码行数:7,代码来源:DailymotionImpl.php

示例8: configure

 public function configure(KalturaConvartableJobData $data, KalturaBatchJob $job)
 {
     $this->data = $data;
     $this->job = $job;
     $this->setMediaInfoEnabled(KBatchBase::$taskConfig->params->mediaInfoEnabled);
     KalturaLog::info("taskConfig-->" . print_r(KBatchBase::$taskConfig, true) . "\ndata->" . print_r($data, true));
 }
开发者ID:kubrickfr,项目名称:server,代码行数:7,代码来源:KOperationEngine.php

示例9: getFieldValue

 protected function getFieldValue(kScope $scope = null)
 {
     if (!$scope) {
         KalturaLog::info('No scope specified');
         return null;
     }
     if (!$scope instanceof kEventScope) {
         KalturaLog::info('Scope must be of type kEventScope, [' . get_class($scope) . '] given');
         return;
     }
     if (!$scope->getEvent()) {
         KalturaLog::info('$scope->getEvent() must return a value');
         return;
     }
     if ($scope->getEvent() && !$scope->getEvent() instanceof IKalturaObjectRelatedEvent) {
         KalturaLog::info('Scope event must realize interface IKalturaObjectRelatedEvent');
         return;
     }
     if ($scope->getEvent() && !$scope->getEvent()->getObject()) {
         KalturaLog::info('Object not found on scope event');
         return;
     }
     if (!method_exists($scope->getEvent()->getObject(), 'getId')) {
         KalturaLog::info('Getter method for object id not found');
         return;
     }
     return $scope->getEvent()->getObject()->getId();
 }
开发者ID:DBezemer,项目名称:server,代码行数:28,代码来源:kObjectIdField.php

示例10: getSuitableProfile

 /**
  * Will return the first virus scan profile of the entry's partner, that defines an entry filter suitable for the given entry.
  * @param int $entryId
  * @return VirusScanProfile the suitable profile object, or null if none found
  */
 public static function getSuitableProfile($entryId)
 {
     $entry = entryPeer::retrieveByPK($entryId);
     if (!$entry) {
         KalturaLog::err('Cannot find entry with id [' . $entryId . ']');
         return null;
     }
     if ($entry->getSource() == entry::ENTRY_MEDIA_SOURCE_WEBCAM) {
         return null;
     }
     $cProfile = new Criteria();
     $cProfile->addAnd(VirusScanProfilePeer::PARTNER_ID, $entry->getPartnerId());
     $cProfile->addAnd(VirusScanProfilePeer::STATUS, VirusScanProfileStatus::ENABLED, Criteria::EQUAL);
     $profiles = VirusScanProfilePeer::doSelect($cProfile);
     if (!$profiles) {
         KalturaLog::info('No virus scan profiles found for partner [' . $entry->getPartnerId() . ']');
         return null;
     }
     foreach ($profiles as $profile) {
         $virusEntryFilter = $profile->getEntryFilterObject();
         if ($virusEntryFilter->matches($entry)) {
             KalturaLog::info('Returning profile with id [' . $profile->getId() . ']');
             return $profile;
         }
     }
     return null;
 }
开发者ID:DBezemer,项目名称:server,代码行数:32,代码来源:VirusScanProfilePeer.php

示例11: dumpApiRequest

 public static function dumpApiRequest($host, $onlyIfAvailable = false)
 {
     if ($onlyIfAvailable) {
         //validate that the other DC is available before dumping the request
         if (kConf::hasParam('disable_dump_api_request') && kConf::get('disable_dump_api_request')) {
             KalturaLog::info('dumpApiRequest is disabled');
             return;
         }
     }
     if (kCurrentContext::$multiRequest_index > 1) {
         KExternalErrors::dieError(KExternalErrors::MULTIREQUEST_PROXY_FAILED);
     }
     self::closeDbConnections();
     // prevent loop back of the proxied request by detecting the "X-Kaltura-Proxy header
     if (isset($_SERVER["HTTP_X_KALTURA_PROXY"])) {
         KExternalErrors::dieError(KExternalErrors::PROXY_LOOPBACK);
     }
     $get_params = $post_params = array();
     // pass uploaded files by adding them as post data with curl @ prefix
     // signifying a file. the $_FILES[xxx][tmp_name] points to the location
     // of the uploaded file.
     // we preserve the original file name by passing the extra ;filename=$_FILES[xxx][name]
     foreach ($_FILES as $key => $value) {
         $post_params[$key] = "@" . $value['tmp_name'] . ";filename=" . $value['name'];
         if (!is_uploaded_file($value['tmp_name'])) {
             KExternalErrors::dieError(KExternalErrors::FILE_NOT_FOUND);
         }
     }
     foreach ($_POST as $key => $value) {
         $post_params[$key] = $value;
     }
     $url = $_SERVER['REQUEST_URI'];
     if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' && kConf::hasParam('https_param_salt')) {
         $post_params['apiProtocol'] = 'https_' . kConf::get('https_param_salt');
     }
     $httpHeader = array("X-Kaltura-Proxy: dumpApiRequest");
     $ipHeader = infraRequestUtils::getSignedIpAddressHeader();
     if ($ipHeader) {
         list($headerName, $headerValue) = $ipHeader;
         $httpHeader[] = $headerName . ": " . $headerValue;
     }
     $ch = curl_init();
     // set URL and other appropriate options
     curl_setopt($ch, CURLOPT_URL, $host . $url);
     curl_setopt($ch, CURLOPT_HTTPHEADER, $httpHeader);
     curl_setopt($ch, CURLOPT_USERAGENT, "curl/7.11.1");
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
     curl_setopt($ch, CURLOPT_POST, TRUE);
     curl_setopt($ch, CURLOPT_POSTFIELDS, $post_params);
     // Set callback function for body
     curl_setopt($ch, CURLOPT_WRITEFUNCTION, 'kFileUtils::read_body');
     // Set callback function for headers
     curl_setopt($ch, CURLOPT_HEADERFUNCTION, 'kFileUtils::read_header');
     header("X-Kaltura:dumpApiRequest " . kDataCenterMgr::getCurrentDcId());
     // grab URL and pass it to the browser
     $content = curl_exec($ch);
     // close curl resource, and free up system resources
     curl_close($ch);
     KExternalErrors::dieGracefully();
 }
开发者ID:GElkayam,项目名称:server,代码行数:60,代码来源:kFileUtils.php

示例12: closeStorageExport

 protected function closeStorageExport(KalturaBatchJob $job)
 {
     KalturaLog::info("Attempting to close the job");
     $storageExportEngine = KExportEngine::getInstance($job->jobSubType, $job->partnerId, $job->data);
     $closeResult = $storageExportEngine->verifyExportedResource();
     $this->closeJob($job, null, null, null, $closeResult ? KalturaBatchJobStatus::FINISHED : KalturaBatchJobStatus::ALMOST_DONE);
 }
开发者ID:kubrickfr,项目名称:server,代码行数:7,代码来源:KAsyncStorageExportCloser.class.php

示例13: processObject

 /**
  * @param KalturaBaseEntry $object
  */
 function processObject($object)
 {
     $client = $this->getClient();
     $entryId = $object->id;
     KalturaLog::info('Deleting entry ' . $entryId);
     $client->baseEntry->delete($entryId);
 }
开发者ID:DBezemer,项目名称:server,代码行数:10,代码来源:KObjectTaskDeleteEntryEngine.php

示例14: copyEventNotificationTemplates

 /**
  * @param Partner $fromPartner
  * @param Partner $toPartner
  */
 protected function copyEventNotificationTemplates(Partner $fromPartner, Partner $toPartner, $permissionRequiredOnly = false)
 {
     $fromPartnerId = $fromPartner->getId();
     $toPartnerId = $toPartner->getId();
     KalturaLog::info("Copy event-notification templates from [{$fromPartnerId}] to [{$toPartnerId}]");
     $c = new Criteria();
     $c->add(EventNotificationTemplatePeer::PARTNER_ID, $fromPartnerId);
     $systemNameCriteria = new Criteria();
     $systemNameCriteria->add(EventNotificationTemplatePeer::PARTNER_ID, $toPartnerId);
     $systemNameCriteria->add(EventNotificationTemplatePeer::STATUS, EventNotificationTemplateStatus::ACTIVE);
     $eventNotificationTemplates = EventNotificationTemplatePeer::doSelect($c);
     foreach ($eventNotificationTemplates as $eventNotificationTemplate) {
         /* @var $eventNotificationTemplate EventNotificationTemplate */
         if ($permissionRequiredOnly && !count($eventNotificationTemplate->getRequiredCopyTemplatePermissions())) {
             continue;
         }
         if (!myPartnerUtils::isPartnerPermittedForCopy($toPartner, $eventNotificationTemplate->getRequiredCopyTemplatePermissions())) {
             continue;
         }
         if ($eventNotificationTemplate->getSystemName()) {
             $c = clone $systemNameCriteria;
             $c->add(EventNotificationTemplatePeer::SYSTEM_NAME, $eventNotificationTemplate->getSystemName());
             if (EventNotificationTemplatePeer::doCount($c)) {
                 continue;
             }
         }
         $newEventNotificationTemplate = $eventNotificationTemplate->copy();
         $newEventNotificationTemplate->setPartnerId($toPartnerId);
         $newEventNotificationTemplate->save();
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:35,代码来源:kEventNotificationObjectCopiedHandler.php

示例15: deletePendingAction

 /**
  * Action goes over all tags with instanceCount==0 and checks whether they need to be removed from the DB. Returns number of removed tags.
  * @action deletePending
  * @return int
  */
 public function deletePendingAction()
 {
     TagPeer::setUseCriteriaFilter(false);
     $c = KalturaCriteria::create(TagPeer::OM_CLASS);
     $filter = new TagFilter();
     $filter->set('_eq_instance_count', 0);
     $filter->attachToCriteria($c);
     $c->applyFilters();
     $count = $c->getRecordsCount();
     if (!$count) {
         KalturaLog::info('No tags pending for deletion.');
         return 0;
     }
     $deletedTags = 0;
     $tagsForDelete = TagPeer::doSelect($c);
     TagPeer::setUseCriteriaFilter(true);
     foreach ($tagsForDelete as $tag) {
         /* @var $tag Tag */
         switch ($tag->getObjectType()) {
             case taggedObjectType::ENTRY:
                 $deletedTags += $this->resolveEntryTag($tag);
                 break;
             case taggedObjectType::CATEGORY:
                 $deletedTags += $this->resolveCategoryTag($tag);
                 break;
         }
     }
     return $deletedTags;
 }
开发者ID:DBezemer,项目名称:server,代码行数:34,代码来源:TagService.php


注:本文中的KalturaLog::info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。