sintonia/airtime_mvc/application/logging/Logging.php
Daniel cbaeda1d6b CC-3404: Change "Now Playing" dashboard SQL query to take advantage of the "playout_status" field in the schedule table
- Updated the logic in GetPlayOrderRange now I get the previous, current and next shows and tracks to be played.
- This information is then sent back to the caller.
	- if the previous track is null the previous show is sent back as an example of the algorithm.
2012-03-13 10:21:01 -04:00

31 lines
754 B
PHP

<?php
class Logging {
private static $_logger;
private static $_path;
public static function getLogger(){
if (!isset(self::$logger)) {
$writer = new Zend_Log_Writer_Stream(self::$_path);
self::$_logger = new Zend_Log($writer);
}
return self::$_logger;
}
public static function setLogPath($path){
self::$_path = $path;
}
public static function log($p_msg){
$logger = self::getLogger();
$logger->info($p_msg);
}
public static function debug($p_msg){
if (defined('APPLICATION_ENV') && APPLICATION_ENV == "development"){
$logger = self::getLogger();
$logger->debug($p_msg);
}
}
}