change Logging::log to Logging::info
This commit is contained in:
parent
15eae0698b
commit
462542bf68
19 changed files with 125 additions and 123 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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()}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ class Logging {
|
|||
private static $_logger;
|
||||
private static $_path;
|
||||
|
||||
public static function getLogger()
|
||||
private static function getLogger()
|
||||
{
|
||||
if (!isset(self::$_logger)) {
|
||||
$writer = new Zend_Log_Writer_Stream(self::$_path);
|
||||
|
@ -37,7 +37,7 @@ class Logging {
|
|||
}
|
||||
}
|
||||
|
||||
public static function log($p_msg)
|
||||
public static function info($p_msg)
|
||||
{
|
||||
$bt = debug_backtrace();
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ class Application_Model_Block implements Application_Model_LibraryEditable
|
|||
*/
|
||||
public function getContents($filterFiles=false)
|
||||
{
|
||||
Logging::log("Getting contents for block {$this->id}");
|
||||
Logging::info("Getting contents for block {$this->id}");
|
||||
|
||||
$files = array();
|
||||
$sql = <<<"EOT"
|
||||
|
@ -387,11 +387,11 @@ EOT;
|
|||
try {
|
||||
|
||||
if (is_numeric($p_afterItem)) {
|
||||
Logging::log("Finding block content item {$p_afterItem}");
|
||||
Logging::info("Finding block content item {$p_afterItem}");
|
||||
|
||||
$afterItem = CcBlockcontentsQuery::create()->findPK($p_afterItem);
|
||||
$index = $afterItem->getDbPosition();
|
||||
Logging::log("index is {$index}");
|
||||
Logging::info("index is {$index}");
|
||||
$pos = ($addType == 'after') ? $index + 1 : $index;
|
||||
|
||||
$contentsToUpdate = CcBlockcontentsQuery::create()
|
||||
|
@ -400,8 +400,8 @@ EOT;
|
|||
->orderByDbPosition()
|
||||
->find($this->con);
|
||||
|
||||
Logging::log("Adding to block");
|
||||
Logging::log("at position {$pos}");
|
||||
Logging::info("Adding to block");
|
||||
Logging::info("at position {$pos}");
|
||||
} else {
|
||||
|
||||
//add to the end of the block
|
||||
|
@ -424,12 +424,12 @@ EOT;
|
|||
->orderByDbPosition()
|
||||
->find($this->con);
|
||||
|
||||
Logging::log("Adding to block");
|
||||
Logging::log("at position {$pos}");
|
||||
Logging::info("Adding to block");
|
||||
Logging::info("at position {$pos}");
|
||||
}
|
||||
|
||||
foreach ($p_items as $ac) {
|
||||
Logging::log("Adding audio file {$ac}");
|
||||
Logging::info("Adding audio file {$ac}");
|
||||
|
||||
if (is_array($ac) && $ac[1] == 'audioclip') {
|
||||
$res = $this->insertBlockElement($this->buildEntry($ac[0], $pos));
|
||||
|
@ -485,32 +485,32 @@ EOT;
|
|||
$pos = 0;
|
||||
//moving items to beginning of the block.
|
||||
if (is_null($p_afterItem)) {
|
||||
Logging::log("moving items to beginning of block");
|
||||
Logging::info("moving items to beginning of block");
|
||||
|
||||
foreach ($contentsToMove as $item) {
|
||||
Logging::log("item {$item->getDbId()} to pos {$pos}");
|
||||
Logging::info("item {$item->getDbId()} to pos {$pos}");
|
||||
$item->setDbPosition($pos);
|
||||
$item->save($this->con);
|
||||
$pos = $pos + 1;
|
||||
}
|
||||
foreach ($otherContent as $item) {
|
||||
Logging::log("item {$item->getDbId()} to pos {$pos}");
|
||||
Logging::info("item {$item->getDbId()} to pos {$pos}");
|
||||
$item->setDbPosition($pos);
|
||||
$item->save($this->con);
|
||||
$pos = $pos + 1;
|
||||
}
|
||||
} else {
|
||||
Logging::log("moving items after {$p_afterItem}");
|
||||
Logging::info("moving items after {$p_afterItem}");
|
||||
|
||||
foreach ($otherContent as $item) {
|
||||
Logging::log("item {$item->getDbId()} to pos {$pos}");
|
||||
Logging::info("item {$item->getDbId()} to pos {$pos}");
|
||||
$item->setDbPosition($pos);
|
||||
$item->save($this->con);
|
||||
$pos = $pos + 1;
|
||||
|
||||
if ($item->getDbId() == $p_afterItem) {
|
||||
foreach ($contentsToMove as $move) {
|
||||
Logging::log("item {$move->getDbId()} to pos {$pos}");
|
||||
Logging::info("item {$move->getDbId()} to pos {$pos}");
|
||||
$move->setDbPosition($pos);
|
||||
$move->save($this->con);
|
||||
$pos = $pos + 1;
|
||||
|
@ -570,7 +570,7 @@ EOT;
|
|||
|
||||
public function getFadeInfo($pos)
|
||||
{
|
||||
Logging::log("Getting fade info for pos {$pos}");
|
||||
Logging::info("Getting fade info for pos {$pos}");
|
||||
|
||||
$row = CcBlockcontentsQuery::create()
|
||||
->joinWith(CcFilesPeer::OM_CLASS)
|
||||
|
@ -655,7 +655,7 @@ EOT;
|
|||
public function setfades($fadein, $fadeout)
|
||||
{
|
||||
if (isset($fadein)) {
|
||||
Logging::log("Setting block fade in {$fadein}");
|
||||
Logging::info("Setting block fade in {$fadein}");
|
||||
$row = CcBlockcontentsQuery::create()
|
||||
->filterByDbBlockId($this->id)
|
||||
->filterByDbPosition(0)
|
||||
|
@ -665,7 +665,7 @@ EOT;
|
|||
}
|
||||
|
||||
if (isset($fadeout)) {
|
||||
Logging::log("Setting block fade out {$fadeout}");
|
||||
Logging::info("Setting block fade out {$fadeout}");
|
||||
$row = CcBlockcontentsQuery::create()
|
||||
->filterByDbBlockId($this->id)
|
||||
->filterByDbPosition($this->getSize()-1)
|
||||
|
@ -992,7 +992,7 @@ EOT;
|
|||
public function storeCriteriaIntoDb($p_criteriaData){
|
||||
// delete criteria under $p_blockId
|
||||
CcBlockcriteriaQuery::create()->findByDbBlockId($this->id)->delete();
|
||||
Logging::log($p_criteriaData);
|
||||
Logging::info($p_criteriaData);
|
||||
//insert modifier rows
|
||||
if (isset($p_criteriaData['criteria'])) {
|
||||
$critKeys = array_keys($p_criteriaData['criteria']);
|
||||
|
@ -1188,7 +1188,7 @@ EOT;
|
|||
$qry->add($spCriteria, $spCriteriaValue, $spCriteriaModifier);
|
||||
}
|
||||
}catch (Exception $e){
|
||||
Logging::log($e);
|
||||
Logging::info($e);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
@ -1210,7 +1210,7 @@ EOT;
|
|||
$out = $qry->setFormatter(ModelCriteria::FORMAT_ON_DEMAND)->find();
|
||||
return array("files"=>$out, "limit"=>$limits, "count"=>$out->count());
|
||||
}catch(Exception $e){
|
||||
Logging::log($e);
|
||||
Logging::info($e);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class Application_Model_Library
|
|||
public static function changePlaylist($p_id, $p_type)
|
||||
{
|
||||
$obj_sess = new Zend_Session_Namespace(UI_PLAYLISTCONTROLLER_OBJ_SESSNAME);
|
||||
Logging::log($obj_sess);
|
||||
Logging::info($obj_sess);
|
||||
|
||||
if (is_null($p_id) || is_null($p_type)) {
|
||||
unset($obj_sess->id);
|
||||
|
|
|
@ -5,4 +5,6 @@ interface Application_Model_LibraryEditable
|
|||
|
||||
public function setMetadata($key, $val);
|
||||
public function setName($name);
|
||||
public function getLength();
|
||||
public function getId();
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ class Application_Model_LiveLog
|
|||
return $minutes;
|
||||
} catch (Exception $e) {
|
||||
header('HTTP/1.0 503 Service Unavailable');
|
||||
Logging::log("GetLiveShowDuration - Could not connect to database.");
|
||||
Logging::info("GetLiveShowDuration - Could not connect to database.");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ class Application_Model_LiveLog
|
|||
return $minutes;
|
||||
} catch (Exception $e) {
|
||||
header('HTTP/1.0 503 Service Unavailable');
|
||||
Logging::log("GetScheduledDuration - Could not connect to database.");
|
||||
Logging::info("GetScheduledDuration - Could not connect to database.");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ class Application_Model_LiveLog
|
|||
|
||||
} catch (Exception $e) {
|
||||
header('HTTP/1.0 503 Service Unavailable');
|
||||
Logging::log("SetNewLogTime - Could not connect to database.");
|
||||
Logging::info("SetNewLogTime - Could not connect to database.");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
@ -338,7 +338,7 @@ class Application_Model_LiveLog
|
|||
|
||||
} catch (Exception $e) {
|
||||
header('HTTP/1.0 503 Service Unavailable');
|
||||
Logging::log("SetEndTime - Could not connect to database.");
|
||||
Logging::info("SetEndTime - Could not connect to database.");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,8 +135,8 @@ class Application_Model_Playlist implements Application_Model_LibraryEditable
|
|||
|
||||
public function getLastModified($format = null)
|
||||
{
|
||||
//Logging::log($this->pl->getDbMtime($format));
|
||||
//Logging::log($this->pl);
|
||||
//Logging::info($this->pl->getDbMtime($format));
|
||||
//Logging::info($this->pl);
|
||||
return $this->pl->getDbMtime($format);
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ class Application_Model_Playlist implements Application_Model_LibraryEditable
|
|||
*/
|
||||
public function getContents($filterFiles=false)
|
||||
{
|
||||
Logging::log("Getting contents for playlist {$this->id}");
|
||||
Logging::info("Getting contents for playlist {$this->id}");
|
||||
$files = array();
|
||||
|
||||
$sql = <<<SQL
|
||||
|
@ -391,11 +391,11 @@ SQL;
|
|||
try {
|
||||
|
||||
if (is_numeric($p_afterItem)) {
|
||||
Logging::log("Finding playlist content item {$p_afterItem}");
|
||||
Logging::info("Finding playlist content item {$p_afterItem}");
|
||||
|
||||
$afterItem = CcPlaylistcontentsQuery::create()->findPK($p_afterItem);
|
||||
$index = $afterItem->getDbPosition();
|
||||
Logging::log("index is {$index}");
|
||||
Logging::info("index is {$index}");
|
||||
$pos = ($addType == 'after') ? $index + 1 : $index;
|
||||
|
||||
$contentsToUpdate = CcPlaylistcontentsQuery::create()
|
||||
|
@ -428,13 +428,13 @@ SQL;
|
|||
|
||||
}
|
||||
|
||||
Logging::log("Adding to playlist");
|
||||
Logging::log("at position {$pos}");
|
||||
Logging::info("Adding to playlist");
|
||||
Logging::info("at position {$pos}");
|
||||
|
||||
foreach ($p_items as $ac) {
|
||||
$res = $this->insertPlaylistElement($this->buildEntry($ac, $pos));
|
||||
$pos = $pos + 1;
|
||||
Logging::log("Adding $ac[1] $ac[0]");
|
||||
Logging::info("Adding $ac[1] $ac[0]");
|
||||
|
||||
}
|
||||
|
||||
|
@ -483,32 +483,32 @@ SQL;
|
|||
$pos = 0;
|
||||
//moving items to beginning of the playlist.
|
||||
if (is_null($p_afterItem)) {
|
||||
Logging::log("moving items to beginning of playlist");
|
||||
Logging::info("moving items to beginning of playlist");
|
||||
|
||||
foreach ($contentsToMove as $item) {
|
||||
Logging::log("item {$item->getDbId()} to pos {$pos}");
|
||||
Logging::info("item {$item->getDbId()} to pos {$pos}");
|
||||
$item->setDbPosition($pos);
|
||||
$item->save($this->con);
|
||||
$pos = $pos + 1;
|
||||
}
|
||||
foreach ($otherContent as $item) {
|
||||
Logging::log("item {$item->getDbId()} to pos {$pos}");
|
||||
Logging::info("item {$item->getDbId()} to pos {$pos}");
|
||||
$item->setDbPosition($pos);
|
||||
$item->save($this->con);
|
||||
$pos = $pos + 1;
|
||||
}
|
||||
} else {
|
||||
Logging::log("moving items after {$p_afterItem}");
|
||||
Logging::info("moving items after {$p_afterItem}");
|
||||
|
||||
foreach ($otherContent as $item) {
|
||||
Logging::log("item {$item->getDbId()} to pos {$pos}");
|
||||
Logging::info("item {$item->getDbId()} to pos {$pos}");
|
||||
$item->setDbPosition($pos);
|
||||
$item->save($this->con);
|
||||
$pos = $pos + 1;
|
||||
|
||||
if ($item->getDbId() == $p_afterItem) {
|
||||
foreach ($contentsToMove as $move) {
|
||||
Logging::log("item {$move->getDbId()} to pos {$pos}");
|
||||
Logging::info("item {$move->getDbId()} to pos {$pos}");
|
||||
$move->setDbPosition($pos);
|
||||
$move->save($this->con);
|
||||
$pos = $pos + 1;
|
||||
|
@ -568,7 +568,7 @@ SQL;
|
|||
|
||||
public function getFadeInfo($pos)
|
||||
{
|
||||
Logging::log("Getting fade info for pos {$pos}");
|
||||
Logging::info("Getting fade info for pos {$pos}");
|
||||
|
||||
$row = CcPlaylistcontentsQuery::create()
|
||||
->joinWith(CcFilesPeer::OM_CLASS)
|
||||
|
@ -654,7 +654,7 @@ SQL;
|
|||
public function setfades($fadein, $fadeout)
|
||||
{
|
||||
if (isset($fadein)) {
|
||||
Logging::log("Setting playlist fade in {$fadein}");
|
||||
Logging::info("Setting playlist fade in {$fadein}");
|
||||
$row = CcPlaylistcontentsQuery::create()
|
||||
->filterByDbPlaylistId($this->id)
|
||||
->filterByDbPosition(0)
|
||||
|
@ -664,7 +664,7 @@ SQL;
|
|||
}
|
||||
|
||||
if (isset($fadeout)) {
|
||||
Logging::log("Setting playlist fade out {$fadeout}");
|
||||
Logging::info("Setting playlist fade out {$fadeout}");
|
||||
$row = CcPlaylistcontentsQuery::create()
|
||||
->filterByDbPlaylistId($this->id)
|
||||
->filterByDbPosition($this->getSize()-1)
|
||||
|
|
|
@ -66,7 +66,7 @@ class Application_Model_Preference
|
|||
|
||||
} catch (Exception $e) {
|
||||
header('HTTP/1.0 503 Service Unavailable');
|
||||
Logging::log("Could not connect to database: ".$e->getMessage());
|
||||
Logging::info("Could not connect to database: ".$e->getMessage());
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ class Application_Model_Preference
|
|||
}
|
||||
} catch (Exception $e) {
|
||||
header('HTTP/1.0 503 Service Unavailable');
|
||||
Logging::log("Could not connect to database: ".$e->getMessage());
|
||||
Logging::info("Could not connect to database: ".$e->getMessage());
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ class Application_Model_Schedule
|
|||
{
|
||||
if (!is_int($p_prev) || !is_int($p_next)) {
|
||||
//must enter integers to specify ranges
|
||||
Logging::log("Invalid range parameters: $p_prev or $p_next");
|
||||
Logging::info("Invalid range parameters: $p_prev or $p_next");
|
||||
return array();
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ class Application_Model_Scheduler
|
|||
$ts = intval($instanceInfo[$id]);
|
||||
$lastSchedTs = intval($instance->getDbLastScheduled("U")) ? : 0;
|
||||
if ($ts < $lastSchedTs) {
|
||||
Logging::log("ts {$ts} last sched {$lastSchedTs}");
|
||||
Logging::info("ts {$ts} last sched {$lastSchedTs}");
|
||||
throw new OutDatedScheduleException("The show {$show->getDbName()} has been previously updated!");
|
||||
}
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ class Application_Model_Scheduler
|
|||
*/
|
||||
private function removeGaps($showInstance, $exclude=null)
|
||||
{
|
||||
Logging::log("removing gaps from show instance #".$showInstance);
|
||||
Logging::info("removing gaps from show instance #".$showInstance);
|
||||
|
||||
$instance = CcShowInstancesQuery::create()->findPK($showInstance, $this->con);
|
||||
if (is_null($instance)) {
|
||||
|
@ -416,7 +416,7 @@ class Application_Model_Scheduler
|
|||
} else {
|
||||
$sched = new CcSchedule();
|
||||
}
|
||||
Logging::log($file);
|
||||
Logging::info($file);
|
||||
$sched->setDbStarts($nextStartDT)
|
||||
->setDbEnds($endTimeDT)
|
||||
->setDbCueIn($file['cuein'])
|
||||
|
|
|
@ -216,8 +216,8 @@ class Application_Model_Show
|
|||
$con->commit();
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
Logging::log("Couldn't update schedule status.");
|
||||
Logging::log($e->getMessage());
|
||||
Logging::info("Couldn't update schedule status.");
|
||||
Logging::info($e->getMessage());
|
||||
}
|
||||
|
||||
Application_Model_RabbitMq::PushSchedule();
|
||||
|
@ -277,27 +277,27 @@ class Application_Model_Show
|
|||
->filterByDbShowId($this->getId())
|
||||
->find();
|
||||
|
||||
Logging::log("Unchecked days:");
|
||||
Logging::info("Unchecked days:");
|
||||
foreach ($p_uncheckedDays as $day) {
|
||||
Logging::log($day);
|
||||
Logging::info($day);
|
||||
}
|
||||
|
||||
foreach ($showDays as $showDay) {
|
||||
//Logging::log("Local show day is: {$showDay->getDbDay()}");
|
||||
//Logging::log("First show day is: {$showDay->getDbFirstShow()}");
|
||||
//Logging::log("Id show days is: {$showDay->getDbId()}");
|
||||
//Logging::info("Local show day is: {$showDay->getDbDay()}");
|
||||
//Logging::info("First show day is: {$showDay->getDbFirstShow()}");
|
||||
//Logging::info("Id show days is: {$showDay->getDbId()}");
|
||||
|
||||
if (in_array($showDay->getDbDay(), $p_uncheckedDays)) {
|
||||
$showDay->reload();
|
||||
//Logging::log("Local show day is: {$showDay->getDbDay()}");
|
||||
//Logging::log("First show day is: {$showDay->getDbFirstShow()}");
|
||||
//Logging::log("Id show days is: {$showDay->getDbId()}");
|
||||
//Logging::info("Local show day is: {$showDay->getDbDay()}");
|
||||
//Logging::info("First show day is: {$showDay->getDbFirstShow()}");
|
||||
//Logging::info("Id show days is: {$showDay->getDbId()}");
|
||||
$startDay = new DateTime("{$showDay->getDbFirstShow()} {$showDay->getDbStartTime()}", new DateTimeZone($showDay->getDbTimezone()));
|
||||
//Logging::log("Show start day: {$startDay->format('Y-m-d H:i:s')}");
|
||||
//Logging::info("Show start day: {$startDay->format('Y-m-d H:i:s')}");
|
||||
$startDay->setTimezone(new DateTimeZone("UTC"));
|
||||
//Logging::log("Show start day UTC: {$startDay->format('Y-m-d H:i:s')}");
|
||||
//Logging::info("Show start day UTC: {$startDay->format('Y-m-d H:i:s')}");
|
||||
$daysRemovedUTC[] = $startDay->format('w');
|
||||
//Logging::log("UTC show day is: {$startDay->format('w')}");
|
||||
//Logging::info("UTC show day is: {$startDay->format('w')}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,7 @@ class Application_Model_Show
|
|||
."WHERE instance_id = (SELECT id FROM cc_show_instances WHERE show_id = $showId ORDER BY starts LIMIT 1) AND rebroadcast = 1 "
|
||||
."ORDER BY starts";
|
||||
|
||||
//Logging::log($sql);
|
||||
//Logging::info($sql);
|
||||
|
||||
$rebroadcasts = $con->query($sql)->fetchAll();
|
||||
|
||||
|
@ -1160,8 +1160,8 @@ class Application_Model_Show
|
|||
$con->commit();
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
Logging::log("Couldn't update schedule status.");
|
||||
Logging::log($e->getMessage());
|
||||
Logging::info("Couldn't update schedule status.");
|
||||
Logging::info($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1590,7 +1590,7 @@ class Application_Model_Show
|
|||
WHERE last_show IS NULL
|
||||
OR first_show < '{$endTimeString}' AND last_show > '{$startTimeString}'";
|
||||
|
||||
//Logging::log($sql);
|
||||
//Logging::info($sql);
|
||||
$res = $con->query($sql)->fetchAll();
|
||||
foreach ($res as $row) {
|
||||
Application_Model_Show::populateShow($row, $p_endTimestamp);
|
||||
|
@ -1723,7 +1723,7 @@ class Application_Model_Show
|
|||
$showDay->setDbFirstShow($dt)->setDbStartTime($dt)
|
||||
->save();
|
||||
|
||||
//Logging::log("setting show's first show.");
|
||||
//Logging::info("setting show's first show.");
|
||||
}
|
||||
|
||||
/* Takes in a UTC DateTime object
|
||||
|
|
|
@ -571,9 +571,9 @@ class Application_Model_ShowInstance
|
|||
$rebroad = new Application_Model_ShowInstance($rebroadcast->getDbId());
|
||||
$rebroad->addFileToShow($file_id, false);
|
||||
} catch (Exception $e) {
|
||||
Logging::log("{$e->getFile()}");
|
||||
Logging::log("{$e->getLine()}");
|
||||
Logging::log("{$e->getMessage()}");
|
||||
Logging::info("{$e->getFile()}");
|
||||
Logging::info("{$e->getLine()}");
|
||||
Logging::info("{$e->getMessage()}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ class Application_Model_StoredFile
|
|||
*/
|
||||
public function setMetadata($p_md=null)
|
||||
{
|
||||
Logging::log("entered setMetadata");
|
||||
Logging::info("entered setMetadata");
|
||||
if (is_null($p_md)) {
|
||||
$this->setDbColMetadata();
|
||||
} else {
|
||||
|
@ -153,7 +153,7 @@ class Application_Model_StoredFile
|
|||
if (isset($this->_dbMD[$dbColumn])) {
|
||||
$propelColumn = $this->_dbMD[$dbColumn];
|
||||
$method = "set$propelColumn";
|
||||
Logging::log($method);
|
||||
Logging::info($method);
|
||||
$this->_file->$method($mdValue);
|
||||
}
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ class Application_Model_StoredFile
|
|||
*/
|
||||
public function getRelativeFileUrl($baseUrl)
|
||||
{
|
||||
Logging::log("getting media!");
|
||||
Logging::info("getting media!");
|
||||
|
||||
return $baseUrl."/api/get-media/file/".$this->getId().".".$this->getFileExtension();
|
||||
}
|
||||
|
@ -760,7 +760,7 @@ class Application_Model_StoredFile
|
|||
$chunk = isset($_REQUEST["chunk"]) ? $_REQUEST["chunk"] : 0;
|
||||
$chunks = isset($_REQUEST["chunks"]) ? $_REQUEST["chunks"] : 0;
|
||||
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
|
||||
Logging::log(__FILE__.":uploadFile(): filename=$fileName to $p_targetDir");
|
||||
Logging::info(__FILE__.":uploadFile(): filename=$fileName to $p_targetDir");
|
||||
// Clean the fileName for security reasons
|
||||
//this needs fixing for songs not in ascii.
|
||||
//$fileName = preg_replace('/[^\w\._]+/', '', $fileName);
|
||||
|
@ -852,7 +852,7 @@ class Application_Model_StoredFile
|
|||
public static function copyFileToStor($p_targetDir, $fileName, $tempname)
|
||||
{
|
||||
$audio_file = $p_targetDir . DIRECTORY_SEPARATOR . $tempname;
|
||||
Logging::log('copyFileToStor: moving file '.$audio_file);
|
||||
Logging::info('copyFileToStor: moving file '.$audio_file);
|
||||
$md5 = md5_file($audio_file);
|
||||
$duplicate = Application_Model_StoredFile::RecallByMd5($md5, true);
|
||||
|
||||
|
@ -877,7 +877,7 @@ class Application_Model_StoredFile
|
|||
}
|
||||
|
||||
if (chmod($audio_file, 0644) === false) {
|
||||
Logging::log("Warning: couldn't change permissions of $audio_file to 0644");
|
||||
Logging::info("Warning: couldn't change permissions of $audio_file to 0644");
|
||||
}
|
||||
|
||||
//check to see if there is enough space in $stor to continue.
|
||||
|
@ -886,7 +886,7 @@ class Application_Model_StoredFile
|
|||
|
||||
if (self::liquidsoapFilePlayabilityTest($audio_file)) {
|
||||
|
||||
Logging::log("copyFileToStor: moving file $audio_file to $audio_stor");
|
||||
Logging::info("copyFileToStor: moving file $audio_file to $audio_stor");
|
||||
|
||||
//Martin K.: changed to rename: Much less load + quicker since this is an atomic operation
|
||||
if (@rename($audio_file, $audio_stor) === false) {
|
||||
|
@ -1004,7 +1004,7 @@ class Application_Model_StoredFile
|
|||
return count($rows);
|
||||
} catch (Exception $e) {
|
||||
header('HTTP/1.0 503 Service Unavailable');
|
||||
Logging::log("Could not connect to database.");
|
||||
Logging::info("Could not connect to database.");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class Application_Model_StreamSetting
|
|||
$ids[] = substr($row["keyname"], 0, strpos($row["keyname"], "_"));
|
||||
}
|
||||
|
||||
//Logging::log(print_r($ids, true));
|
||||
//Logging::info(print_r($ids, true));
|
||||
return $ids;
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ class Application_Model_Systemstatus
|
|||
|
||||
$partitions[$totalSpace]->totalSpace = $totalSpace;
|
||||
$partitions[$totalSpace]->totalFreeSpace = $totalSpace - $usedSpace;
|
||||
Logging::log($partitions[$totalSpace]->totalFreeSpace);
|
||||
Logging::info($partitions[$totalSpace]->totalFreeSpace);
|
||||
} else {
|
||||
/* First lets get all the watched directories. Then we can group them
|
||||
* into the same partitions by comparing the partition sizes. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue