2015-05-05 03:00:01 +02:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
|
|
|
|
class Log {
|
|
|
|
|
2018-07-10 19:53:53 +02:00
|
|
|
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-10 19:53:53 +02:00
|
|
|
|
2018-07-28 18:33:37 +02:00
|
|
|
$messageType = 0;
|
2017-07-16 20:10:19 +02:00
|
|
|
if (is_array($text) ) {
|
2018-07-10 19:53:53 +02:00
|
|
|
error_log('------------------------', $messageType);
|
|
|
|
error_log('Array', $messageType);
|
|
|
|
error_log('------------------------', $messageType);
|
2017-07-16 20:10:19 +02:00
|
|
|
foreach ($text as $key=>$value) {
|
2018-07-10 19:53:53 +02:00
|
|
|
error_log($key.'=>'.$value, $messageType);
|
2017-07-16 20:10:19 +02:00
|
|
|
}
|
2018-07-10 19:53:53 +02:00
|
|
|
error_log('------------------------', $messageType);
|
2017-07-16 20:10:19 +02:00
|
|
|
}
|
2018-07-10 19:53:53 +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
|
|
|
}
|