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

29 lines
690 B
PHP
Raw Permalink 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);
2018-12-26 20:43:20 +01:00
if (DEBUG_TYPE=='TRACE') {
error_log(print_r(debug_backtrace(), true));
}
2015-05-05 03:00:01 +02:00
}
2015-05-31 03:06:55 +02:00
}