change Logging::log to Logging::info

This commit is contained in:
Martin Konecny 2012-08-21 18:41:56 -04:00
parent 15eae0698b
commit 462542bf68
19 changed files with 125 additions and 123 deletions

View file

@ -318,7 +318,7 @@ class ApiController extends Zend_Controller_Action
}
$result['AIRTIME_API_VERSION'] = AIRTIME_API_VERSION; //used by caller to determine if the airtime they are running or widgets in use is out of date.
header("Content-type: text/javascript");
Logging::log($result);
Logging::info($result);
// If a callback is not given, then just provide the raw JSON.
echo isset($_GET['callback']) ? $_GET['callback'].'('.json_encode($result).')' : json_encode($result);
} else {
@ -359,7 +359,7 @@ class ApiController extends Zend_Controller_Action
$file->setLastPlayedTime($now);
}
} catch (Exception $e) {
Logging::log($e);
Logging::info($e);
}
echo json_encode(array("status"=>1, "message"=>""));
@ -475,8 +475,8 @@ class ApiController extends Zend_Controller_Action
);
}
Application_Model_Preference::SetImportTimestamp();
Logging::log("--->Mode: $mode || file: {$md['MDATA_KEY_FILEPATH']} ");
Logging::log( $md );
Logging::info("--->Mode: $mode || file: {$md['MDATA_KEY_FILEPATH']} ");
Logging::info( $md );
if ($mode == "create") {
$filepath = $md['MDATA_KEY_FILEPATH'];
$filepath = Application_Common_OsPath::normpath($filepath);
@ -567,8 +567,8 @@ class ApiController extends Zend_Controller_Action
//unset( $info_json["MDATA_KEY_BITRATE"] );
if( !array_key_exists('mode', $info_json) ) { // Log invalid requests
Logging::log("Received bad request(key=$k), no 'mode' parameter. Bad request is:");
Logging::log( $info_json );
Logging::info("Received bad request(key=$k), no 'mode' parameter. Bad request is:");
Logging::info( $info_json );
array_push( $responses, array(
'error' => "Bad request. no 'mode' parameter passed.",
'key' => $k));
@ -577,8 +577,8 @@ class ApiController extends Zend_Controller_Action
// A request still has a chance of being invalid even if it exists but it's validated
// by $valid_modes array
$mode = $info_json['mode'];
Logging::log("Received bad request(key=$k). 'mode' parameter was invalid with value: '$mode'. Request:");
Logging::log( $info_json );
Logging::info("Received bad request(key=$k). 'mode' parameter was invalid with value: '$mode'. Request:");
Logging::info( $info_json );
array_push( $responses, array(
'error' => "Bad request. 'mode' parameter is invalid",
'key' => $k,
@ -615,7 +615,7 @@ class ApiController extends Zend_Controller_Action
}
}
Logging::log( $md );
Logging::info( $md );
// update import timestamp
Application_Model_Preference::SetImportTimestamp();
@ -781,7 +781,7 @@ class ApiController extends Zend_Controller_Action
$component = $request->getParam('component');
$remoteAddr = Application_Model_ServiceRegister::GetRemoteIpAddr();
Logging::log("Registered Component: ".$component."@".$remoteAddr);
Logging::info("Registered Component: ".$component."@".$remoteAddr);
Application_Model_ServiceRegister::Register($component, $remoteAddr);
}
@ -902,7 +902,7 @@ class ApiController extends Zend_Controller_Action
public function rabbitmqDoPushAction()
{
$request = $this->getRequest();
Logging::log("Notifying RabbitMQ to send message to pypo");
Logging::info("Notifying RabbitMQ to send message to pypo");
Application_Model_RabbitMq::PushSchedule();
}

View file

@ -117,7 +117,7 @@ class PlaylistController extends Zend_Controller_Action
{
$this->view->error = "{$p_type} not found";
Logging::log("{$p_type} not found");
Logging::info("{$p_type} not found");
Application_Model_Library::changePlaylist(null, $p_type);
$this->createFullResponse(null);
}
@ -133,9 +133,9 @@ class PlaylistController extends Zend_Controller_Action
{
$this->view->error = "Something went wrong.";
Logging::log("{$e->getFile()}");
Logging::log("{$e->getLine()}");
Logging::log("{$e->getMessage()}");
Logging::info("{$e->getFile()}");
Logging::info("{$e->getLine()}");
Logging::info("{$e->getMessage()}");
}
private function wrongTypeToBlock($obj)
@ -176,7 +176,7 @@ class PlaylistController extends Zend_Controller_Action
$id = $this->_getParam('id', null);
$type = $this->_getParam('type');
$objInfo = Application_Model_Library::getObjInfo($type);
Logging::log("editing {$type} {$id}");
Logging::info("editing {$type} {$id}");
if (!is_null($id)) {
Application_Model_Library::changePlaylist($id, $type);
@ -206,12 +206,12 @@ class PlaylistController extends Zend_Controller_Action
$user = new Application_Model_User($userInfo->id);
try {
Logging::log("Currently active {$type} {$this->obj_sess->id}");
Logging::info("Currently active {$type} {$this->obj_sess->id}");
if (in_array($this->obj_sess->id, $ids)) {
Logging::log("Deleting currently active {$type}");
Logging::info("Deleting currently active {$type}");
Application_Model_Library::changePlaylist(null, $type);
} else {
Logging::log("Not deleting currently active {$type}");
Logging::info("Not deleting currently active {$type}");
$obj = new $objInfo['className']($this->obj_sess->id);
}

View file

@ -69,8 +69,8 @@ class PlayouthistoryController extends Zend_Controller_Action
$startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC"));
$endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC"));
Logging::log("history starts {$startsDT->format("Y-m-d H:i:s")}");
Logging::log("history ends {$endsDT->format("Y-m-d H:i:s")}");
Logging::info("history starts {$startsDT->format("Y-m-d H:i:s")}");
Logging::info("history ends {$endsDT->format("Y-m-d H:i:s")}");
$history = new Application_Model_PlayoutHistory($startsDT, $endsDT, $params);

View file

@ -864,9 +864,9 @@ class ScheduleController extends Zend_Controller_Action
Application_Model_RabbitMq::SendMessageToPypo("disconnect_source", $data);
} catch (Exception $e) {
$this->view->error = $e->getMessage();
Logging::log($e->getMessage());
Logging::log("{$e->getFile()}");
Logging::log("{$e->getLine()}");
Logging::info($e->getMessage());
Logging::info("{$e->getFile()}");
Logging::info("{$e->getLine()}");
}
}
}

View file

@ -290,14 +290,14 @@ class ShowbuilderController extends Zend_Controller_Action
$scheduler->scheduleAfter($scheduledItems, $mediaItems);
} catch (OutDatedScheduleException $e) {
$this->view->error = $e->getMessage();
Logging::log($e->getMessage());
Logging::log("{$e->getFile()}");
Logging::log("{$e->getLine()}");
Logging::info($e->getMessage());
Logging::info("{$e->getFile()}");
Logging::info("{$e->getLine()}");
} catch (Exception $e) {
$this->view->error = $e->getMessage();
Logging::log($e->getMessage());
Logging::log("{$e->getFile()}");
Logging::log("{$e->getLine()}");
Logging::info($e->getMessage());
Logging::info("{$e->getFile()}");
Logging::info("{$e->getLine()}");
}
}
@ -311,14 +311,14 @@ class ShowbuilderController extends Zend_Controller_Action
$scheduler->removeItems($items);
} catch (OutDatedScheduleException $e) {
$this->view->error = $e->getMessage();
Logging::log($e->getMessage());
Logging::log("{$e->getFile()}");
Logging::log("{$e->getLine()}");
Logging::info($e->getMessage());
Logging::info("{$e->getFile()}");
Logging::info("{$e->getLine()}");
} catch (Exception $e) {
$this->view->error = $e->getMessage();
Logging::log($e->getMessage());
Logging::log("{$e->getFile()}");
Logging::log("{$e->getLine()}");
Logging::info($e->getMessage());
Logging::info("{$e->getFile()}");
Logging::info("{$e->getLine()}");
}
}
@ -333,14 +333,14 @@ class ShowbuilderController extends Zend_Controller_Action
$scheduler->moveItem($selectedItems, $afterItem);
} catch (OutDatedScheduleException $e) {
$this->view->error = $e->getMessage();
Logging::log($e->getMessage());
Logging::log("{$e->getFile()}");
Logging::log("{$e->getLine()}");
Logging::info($e->getMessage());
Logging::info("{$e->getFile()}");
Logging::info("{$e->getLine()}");
} catch (Exception $e) {
$this->view->error = $e->getMessage();
Logging::log($e->getMessage());
Logging::log("{$e->getFile()}");
Logging::log("{$e->getLine()}");
Logging::info($e->getMessage());
Logging::info("{$e->getFile()}");
Logging::info("{$e->getLine()}");
}
}