Revision 026e2441
Added by Phil Davis over 9 years ago
etc/inc/system.inc | ||
---|---|---|
711 | 711 |
// Rather than repeatedly use the same code, use this function to build a list of remote servers. |
712 | 712 |
$facility .= " ". |
713 | 713 |
$remote_servers = ""; |
714 |
$pad_to = 56;
|
|
714 |
$pad_to = max(strlen($facility), 56);
|
|
715 | 715 |
$padding = ceil(($pad_to - strlen($facility))/8)+1; |
716 | 716 |
if($syslogcfg['remoteserver']) |
717 | 717 |
$remote_servers .= "{$facility}" . str_repeat("\t", $padding) . "@" . system_syslogd_fixup_server($syslogcfg['remoteserver']) . "\n"; |
... | ... | |
844 | 844 |
local3.* {$log_directive}{$g['varlog_path']}/vpn.log |
845 | 845 |
local4.* {$log_directive}{$g['varlog_path']}/portalauth.log |
846 | 846 |
local7.* {$log_directive}{$g['varlog_path']}/dhcpd.log |
847 |
*.notice;kern.debug;lpr.info;mail.crit;daemon.none; {$log_directive}{$g['varlog_path']}/system.log |
|
848 |
news.err;local0.none;local3.none;local4.none; {$log_directive}{$g['varlog_path']}/system.log |
|
849 |
local7.none {$log_directive}{$g['varlog_path']}/system.log |
|
850 |
security.* {$log_directive}{$g['varlog_path']}/system.log |
|
851 |
auth.info;authpriv.info;daemon.info {$log_directive}{$g['varlog_path']}/system.log |
|
847 |
*.notice;kern.debug;lpr.info;mail.crit;daemon.none;news.err;local0.none;local3.none;local4.none;local7.none;security.*;auth.info;authpriv.info;daemon.info {$log_directive}{$g['varlog_path']}/system.log |
|
852 | 848 |
auth.info;authpriv.info |exec /usr/local/sbin/sshlockout_pf 15 |
853 | 849 |
*.emerg * |
854 | 850 |
|
... | ... | |
860 | 856 |
if (isset($syslogcfg['dhcp'])) |
861 | 857 |
$syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "local7.*"); |
862 | 858 |
if (isset($syslogcfg['system'])) { |
863 |
$syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "*.notice;kern.debug;lpr.info;mail.crit;"); |
|
864 |
$syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "news.err;local0.none;local3.none;local7.none"); |
|
865 |
$syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "security.*"); |
|
866 |
$syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "auth.info;authpriv.info;daemon.info"); |
|
867 |
$syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "*.emerg"); |
|
859 |
$syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "*.emerg;*.notice;kern.debug;lpr.info;mail.crit;news.err;local0.none;local3.none;local7.none;security.*;auth.info;authpriv.info;daemon.info"); |
|
868 | 860 |
} |
869 | 861 |
if (isset($syslogcfg['logall'])) { |
870 | 862 |
// Make everything mean everything, including facilities excluded above. |
Also available in: Unified diff
Fix duplicate syslog messages - Redmine #5606 for RELENG_2_2
The generated syslog.conf needs to have the system.log selections combined into a single line in 2 places. The OP on redmine 5606 just showed 1 place in the diff there.
On my system, this gets rid of the duplicated message on login:
php-fpm11074: /index.php: Successful login for user 'my.name' from: 10.11.12.13
Note: for some reason old line 848 includes local4.none - but local4.none does not appear in old line 864. What is that about? Is that another different bug?
I did not mess with that, but I noticed that the OPs diff listing did also add in local4.none where it seems to be missing.