| | |
| | | function console() |
| | | { |
| | | $args = func_get_args(); |
| | | |
| | | if (class_exists('rcmail', false)) |
| | | rcmail::get_instance()->plugins->exec_hook('console', $args); |
| | | rcmail::get_instance()->plugins->exec_hook('console', $args); |
| | | |
| | | $msg = array(); |
| | | foreach ($args as $arg) |
| | | $msg[] = !is_string($arg) ? var_export($arg, true) : $arg; |
| | | $msg[] = !is_string($arg) ? var_export($arg, true) : $arg; |
| | | |
| | | if (!($GLOBALS['CONFIG']['debug_level'] & 4)) |
| | | write_log('console', join(";\n", $msg)); |
| | |
| | | |
| | | if (!is_string($line)) |
| | | $line = var_export($line, true); |
| | | |
| | | $log_entry = sprintf("[%s]: %s\n", |
| | | date("d-M-Y H:i:s O", mktime()), |
| | | $line); |
| | | |
| | | if (empty($CONFIG['log_date_format'])) |
| | | $CONFIG['log_date_format'] = 'd-M-Y H:i:s O'; |
| | | |
| | | $log_entry = sprintf("[%s]: %s\n", date($CONFIG['log_date_format']), $line); |
| | | |
| | | if ($CONFIG['log_driver'] == 'syslog') { |
| | | if ($name == 'errors') |