mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
syslog, move core syslog facilities (applications in our case) to core plugin
This commit is contained in:
parent
3b2c9aecdc
commit
274ec3556e
@ -171,3 +171,24 @@ function core_cron()
|
||||
|
||||
return $jobs;
|
||||
}
|
||||
|
||||
function core_syslog()
|
||||
{
|
||||
$logfacilities = array();
|
||||
|
||||
$logfacilities['configd'] = array('facility' => array('configd.py'));
|
||||
$logfacilities['dhcpd'] = array('facility' => array('dhcpd', 'dhcrelay'));
|
||||
$logfacilities['filter'] = array('facility' => array('filterlog'));
|
||||
$logfacilities['gateways'] = array('facility' => array('dpinger'));
|
||||
$logfacilities['lighttpd'] = array('facility' => array('lighttpd'));
|
||||
$logfacilities['pkg'] = array('facility' => array('pkg', 'pkg-static'));
|
||||
$logfacilities['portalauth'] = array('facility' => array('captiveportal'));
|
||||
$logfacilities['ppps'] = array('facility' => array('ppp'));
|
||||
$logfacilities['resolver'] = array('facility' => array('unbound'));
|
||||
$logfacilities['routing'] = array('facility' => array(
|
||||
'radvd', 'routed', 'rtsold', 'olsrd', 'zebra', 'ospfd', 'bgpd', 'miniupnpd'
|
||||
));
|
||||
$logfacilities['wireless'] = array('facility' => array('hostapd'));
|
||||
|
||||
return $logfacilities;
|
||||
}
|
||||
|
||||
@ -594,23 +594,6 @@ function system_syslogd_start($verbose = false, $restart = false)
|
||||
$syslogconfs[$plugin_name] = $plugin_details;
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX Standard syslog configs overwrite plugins, but we can
|
||||
* get rid of this behaviour by wrapping this local array using
|
||||
* the key as a "name" entry in the array...
|
||||
*/
|
||||
$syslogconfs['configd'] = array('facility' => array('configd.py'));
|
||||
$syslogconfs['dhcpd'] = array('facility' => array('dhcpd', 'dhcrelay'));
|
||||
$syslogconfs['filter'] = array('facility' => array('filterlog'));
|
||||
$syslogconfs['gateways'] = array('facility' => array('dpinger'));
|
||||
$syslogconfs['lighttpd'] = array('facility' => array('lighttpd'));
|
||||
$syslogconfs['pkg'] = array('facility' => array('pkg', 'pkg-static'));
|
||||
$syslogconfs['portalauth'] = array('facility' => array('captiveportal'));
|
||||
$syslogconfs['ppps'] = array('facility' => array('ppp'));
|
||||
$syslogconfs['resolver'] = array('facility' => array('unbound'));
|
||||
$syslogconfs['routing'] = array('facility' => array('radvd', 'routed', 'rtsold', 'olsrd', 'zebra', 'ospfd', 'bgpd', 'miniupnpd'));
|
||||
$syslogconfs['wireless'] = array('facility' => array('hostapd'));
|
||||
|
||||
$separatelogfacilities = array();
|
||||
foreach ($syslogconfs as $logTopic => $logConfig) {
|
||||
$syslogconf .= "!".implode(',', $logConfig['facility'])."\n";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user