respect domain.writeerrorlog and domain.writeaccesslog when using log-to-pipe
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -772,21 +772,29 @@ class Apache extends HttpConfigBase
|
|||||||
$logtype = 'vhost_combined';
|
$logtype = 'vhost_combined';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings::Get('system.logfiles_piped') == '1' && Settings::Get('system.logfiles_script') != '') {
|
if (Settings::Get('system.logfiles_piped') == '1' && Settings::Get('system.logfiles_script') != ''z) {
|
||||||
// replace for error_log
|
if ($domain['writeerrorlog']) {
|
||||||
$command = \Froxlor\PhpHelper::replaceVariables(Settings::Get('system.logfiles_script'), array(
|
// replace for error_log
|
||||||
'LOGFILE' => $error_log,
|
$command = \Froxlor\PhpHelper::replaceVariables(Settings::Get('system.logfiles_script'), array(
|
||||||
'DOMAIN' => $domain['domain'],
|
'LOGFILE' => $error_log,
|
||||||
'CUSTOMER' => $domain['loginname']
|
'DOMAIN' => $domain['domain'],
|
||||||
));
|
'CUSTOMER' => $domain['loginname']
|
||||||
$logfiles_text .= ' ErrorLog "|' . $command . "\"\n";
|
));
|
||||||
// replace for access_log
|
$logfiles_text .= ' ErrorLog "|' . $command . "\"\n";
|
||||||
$command = \Froxlor\PhpHelper::replaceVariables(Settings::Get('system.logfiles_script'), array(
|
} else {
|
||||||
'LOGFILE' => $access_log,
|
$logfiles_text .= ' ErrorLog "' . $error_log . '"' . "\n";
|
||||||
'DOMAIN' => $domain['domain'],
|
}
|
||||||
'CUSTOMER' => $domain['loginname']
|
if ($domain['writeaccesslog']) {
|
||||||
));
|
// replace for access_log
|
||||||
$logfiles_text .= ' CustomLog "|' . $command . '" ' . $logtype . "\n";
|
$command = \Froxlor\PhpHelper::replaceVariables(Settings::Get('system.logfiles_script'), array(
|
||||||
|
'LOGFILE' => $access_log,
|
||||||
|
'DOMAIN' => $domain['domain'],
|
||||||
|
'CUSTOMER' => $domain['loginname']
|
||||||
|
));
|
||||||
|
$logfiles_text .= ' CustomLog "|' . $command . '" ' . $logtype . "\n";
|
||||||
|
} else {
|
||||||
|
$logfiles_text .= ' CustomLog "' . $access_log . '" ' . $logtype . "\n";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$logfiles_text .= ' ErrorLog "' . $error_log . '"' . "\n";
|
$logfiles_text .= ' ErrorLog "' . $error_log . '"' . "\n";
|
||||||
$logfiles_text .= ' CustomLog "' . $access_log . '" ' . $logtype . "\n";
|
$logfiles_text .= ' CustomLog "' . $access_log . '" ' . $logtype . "\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user