make sure used constants are defined

This commit is contained in:
Steffen Schröder 2014-08-05 01:54:50 +02:00
parent f6e39cfbe5
commit 965fa3a499

View File

@ -29,10 +29,10 @@ abstract class Logger {
$logsFolder = self::getLogsFolder(); $logsFolder = self::getLogsFolder();
if ($logsFolder) { if ($logsFolder) {
$logFileName = $logsFolder . 'ManiaControl'; $logFileName = $logsFolder . 'ManiaControl';
if (LOG_NAME_USE_DATE) { if (!defined('LOG_NAME_USE_DATE') || LOG_NAME_USE_DATE) {
$logFileName .= '_' . date('Y-m-d'); $logFileName .= '_' . date('Y-m-d');
} }
if (LOG_NAME_USE_PID) { if (!defined('LOG_NAME_USE_PID') || LOG_NAME_USE_PID) {
$logFileName .= '_' . getmypid(); $logFileName .= '_' . getmypid();
} }
$logFileName .= '.log'; $logFileName .= '.log';