bludit/bl-kernel/helpers/log.class.php

25 lines
608 B
PHP
Raw Normal View History

2015-05-05 03:00:01 +02:00
<?php defined('BLUDIT') or die('Bludit CMS.');
class Log {
public static function set($text, $type=LOG_TYPE_INFO)
2015-05-05 03:00:01 +02:00
{
2018-07-28 18:33:37 +02:00
if (!DEBUG_MODE) {
return false;
}
2018-07-28 18:33:37 +02:00
$messageType = 0;
2017-07-16 20:10:19 +02:00
if (is_array($text) ) {
error_log('------------------------', $messageType);
error_log('Array', $messageType);
error_log('------------------------', $messageType);
2017-07-16 20:10:19 +02:00
foreach ($text as $key=>$value) {
error_log($key.'=>'.$value, $messageType);
2017-07-16 20:10:19 +02:00
}
error_log('------------------------', $messageType);
2017-07-16 20:10:19 +02:00
}
error_log($type.' ['.BLUDIT_VERSION.'] ['.$_SERVER['REQUEST_URI'].'] '.$text, $messageType);
2015-05-05 03:00:01 +02:00
}
2015-05-31 03:06:55 +02:00
}