mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
system: closelog() -> syslog() trashes our main openlog()
So do a "reopenlog()" in the most convenient way (which is not very convenient). Noticed while working on #6115
This commit is contained in:
parent
add531ec82
commit
ef11b7fc1f
@ -132,6 +132,7 @@ function session_auth()
|
||||
openlog("audit", LOG_ODELAY, LOG_AUTH);
|
||||
log_msg($message, $prio);
|
||||
closelog();
|
||||
reopenlog();
|
||||
}
|
||||
|
||||
if (session_status() == PHP_SESSION_NONE) {
|
||||
|
||||
@ -71,7 +71,13 @@ final class product
|
||||
}
|
||||
}
|
||||
|
||||
openlog(product::getInstance()->id(), LOG_ODELAY, LOG_USER);
|
||||
function reopenlog()
|
||||
{
|
||||
openlog(product::getInstance()->id(), LOG_ODELAY, LOG_USER);
|
||||
}
|
||||
|
||||
reopenlog();
|
||||
|
||||
register_shutdown_function('closelog');
|
||||
|
||||
require_once("xmlparse.inc");
|
||||
|
||||
@ -296,6 +296,7 @@ function filter_configure_sync($verbose = false, $load_aliases = true)
|
||||
|
||||
unlock($filterlck);
|
||||
closelog();
|
||||
reopenlog();
|
||||
|
||||
service_log("done.\n", $verbose);
|
||||
|
||||
@ -394,6 +395,7 @@ function filter_configure_sync($verbose = false, $load_aliases = true)
|
||||
|
||||
unlock($filterlck);
|
||||
closelog();
|
||||
reopenlog();
|
||||
|
||||
service_log("failed.\n", $verbose);
|
||||
|
||||
@ -435,6 +437,7 @@ function filter_configure_sync($verbose = false, $load_aliases = true)
|
||||
|
||||
unlock($filterlck);
|
||||
closelog();
|
||||
reopenlog();
|
||||
|
||||
service_log("failed.\n", $verbose);
|
||||
|
||||
@ -468,6 +471,7 @@ function filter_configure_sync($verbose = false, $load_aliases = true)
|
||||
|
||||
unlock($filterlck);
|
||||
closelog();
|
||||
reopenlog();
|
||||
|
||||
service_log("done.\n", $verbose);
|
||||
}
|
||||
|
||||
@ -557,6 +557,7 @@ function unbound_add_host_entries($ifconfig_details = null)
|
||||
file_put_contents('/var/unbound/host_entries.conf', $unbound_entries);
|
||||
|
||||
closelog();
|
||||
reopenlog();
|
||||
}
|
||||
|
||||
function unbound_acls_subnets()
|
||||
|
||||
@ -77,5 +77,4 @@ if (!empty($auth_data['user']) && isset($auth_data['password'])) {
|
||||
}
|
||||
}
|
||||
|
||||
closelog();
|
||||
exit($exit_status);
|
||||
|
||||
@ -56,12 +56,10 @@ if (flock($fp, LOCK_EX)) {
|
||||
SRV_FAIL_FACTOR, implode(",", $failed_services)
|
||||
));
|
||||
set_single_sysctl("net.inet.carp.demotion", SRV_FAIL_FACTOR);
|
||||
closelog();
|
||||
} elseif (empty($failed_services) && $demotion_set) {
|
||||
// demotion bitmask set and service(s) operational
|
||||
syslog(LOG_WARNING, sprintf("carp promoted by %d due to service recovery", SRV_FAIL_FACTOR));
|
||||
set_single_sysctl("net.inet.carp.demotion", -1 * SRV_FAIL_FACTOR);
|
||||
closelog();
|
||||
}
|
||||
|
||||
flock($fp, LOCK_UN);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user