diff options
author | Colin Smith <colin@pfsense.org> | 2005-06-22 01:24:25 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-06-22 01:24:25 +0000 |
commit | a728d2ea75d6f467506e017bd4dc3678849e8aa7 (patch) | |
tree | 6dfaba60de7aaacebf926042432ffc2bf660b92d | |
parent | c6a74fa11265380d425219245dc8d2936ba33c22 (diff) | |
download | pfsense-a728d2ea75d6f467506e017bd4dc3678849e8aa7.zip pfsense-a728d2ea75d6f467506e017bd4dc3678849e8aa7.tar.gz |
Add package logging to syslogd_start().
-rw-r--r-- | etc/inc/system.inc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index a453e1a..f6976bc 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -201,6 +201,15 @@ function system_syslogd_start() { killbypid("{$g['varrun_path']}/syslog.pid"); if (isset($syslogcfg['enable'])) { + if($config['installedpackages']['package']) { + foreach($config['installedpackages']['package'] as $package) { + if($package['logging']) { + $pkgfacilities[] = $package['logging']['facilityname']; + $syslogconf .= '!' . $package['logging']['facilityname'] . "\n*.*\t\t\t\t\t\t%{$g['varlog_path']}/" . $package['logging']['logfilename'] . "\n"; + } + } + $syslogconf .= '!-' . implode(',', $pkgfacilities) . "\n"; + } /* write syslog.conf */ $fd = fopen("{$g['varetc_path']}/syslog.conf", "w"); @@ -209,7 +218,7 @@ function system_syslogd_start() { return 1; } - $syslogconf = <<<EOD + $syslogconf .= <<<EOD local0.* %{$g['varlog_path']}/filter.log local3.* %{$g['varlog_path']}/vpn.log local4.* %{$g['varlog_path']}/portalauth.log @@ -256,15 +265,6 @@ auth.info;authpriv.info;daemon.info @{$syslogcfg['remoteserver']} *.emerg @{$syslogcfg['remoteserver']} EOD; } - - if($config['installedpackages']['package']) { - foreach($config['installedpackages']['package'] as $package) { - if($package['logging']) { - $syslogconf .= $package['logging']['facilityname'] . "\t\t\t\t" . $package['logging']['logfilename'] . "\n"; - } - } - } - fwrite($fd, $syslogconf); fclose($fd); |