/** * Saves cronjob handler activity to a log file. * * @since 6.0.00 */ function saveLogs($text) { $cronDir = cronDir() . 'cron/'; if (!file_put_contents($cronDir . 'logs/cronjobs.log', date('Y-m-d H:i:s') . ' - ' . $text . PHP_EOL . _file_get_contents($cronDir . 'logs/cronjobs.log'))) { etsis_monolog('cron', _t('cannot write to cronjobs database file, please check file rights'), 'addError'); } }
/** * Custom make directory function. * * This function will check if the path is an existing directory, * if not, then it will be created with set permissions and also created * recursively if needed. * * @since 6.1.00 * @param string $path * Path to be created. * @return string */ function _mkdir($path) { if ('' == _trim($path)) { $message = _t('Invalid directory path: Empty path given.'); _incorrectly_called(__FUNCTION__, $message, '6.2.0'); return; } if (!is_dir($path)) { if (!mkdir($path, 0755, true)) { etsis_monolog('core_function', sprintf(_t('The following directory could not be created: %s'), $path), 'addError'); return; } } }
/** * Custom error log function for better PHP logging. * * @deprecated since release 6.2.11 * @since 6.2.0 * @param string $name * Log channel and log file prefix. * @param string $message * Message printed to log. */ function _error_log($name, $message) { _deprecated_function(__FUNCTION__, '6.2.11', 'etsis_monolog'); return etsis_monolog($name, $message, $level = 'addInfo'); }