2 # @var $message - string
5 public static function log($message, $isJson =
false)
20 $message = str_replace($from, $to, $message);
22 $logPath = (Yii::app()->getBasePath() .
'/runtime');
23 $log = fopen($logPath .
'/last.log',
'a');
24 $logHistory = fopen($logPath .
'/'.date(
'Y-m-d').
'_dc-ui.log',
'a');
25 $string = date(
"\n\n" .
'[d-m-Y H:i:s] >>> ') . $message;
26 fwrite($log, CHtml::encode($string));
28 fwrite($logHistory, $string);
33 $logPath = (Yii::app()->getBasePath() .
'/runtime');
34 $logContent = file_get_contents($logPath .
'/last.log');
39 $logPath = (Yii::app()->getBasePath() .
'/runtime');
40 $log = fopen($logPath .
'/last.log',
'w');