From b3e2fa36a3a327ade19eb5403ebd42ea0fbb2f48 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 11 Mar 2018 10:40:56 +0100 Subject: [PATCH] system: logging tweaks * Allow clearing configd log in clear all * Neither configd nor lighttpd remote exists These things will have to wait till syslog-ng is properly integrated. --- src/etc/inc/system.inc | 57 +++++++++++++++++----------------- src/www/diag_logs_settings.php | 1 + 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 4a2e1f78b..d119155f2 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -1,32 +1,32 @@ - Copyright (C) 2004-2007 Scott Ullrich - Copyright (C) 2003-2004 Manuel Kasper - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (C) 2016-2018 Franco Fichtner + * Copyright (C) 2004-2007 Scott Ullrich + * Copyright (C) 2003-2004 Manuel Kasper + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ function system_powerd_configure($verbose = false) { @@ -693,8 +693,8 @@ function system_syslogd_start($verbose = false) */ $syslogconfs['dhcpd'] = array('facility' => array('dhcpd', 'dhcrelay', 'dhclient', 'dhcp6c'), 'local' => '/var/dhcpd/var/run/log', 'remote' => 'dhcp'); $syslogconfs['filter'] = array('facility' => array('filterlog'), 'remote' => 'filter'); - $syslogconfs['lighttpd'] = array('facility' => array('lighttpd'), 'remote' => 'lighttpd'); - $syslogconfs['configd'] = array('facility' => array('configd.py'), 'remote' => 'configd.py'); + $syslogconfs['lighttpd'] = array('facility' => array('lighttpd')); + $syslogconfs['configd'] = array('facility' => array('configd.py')); $syslogconfs['gateways'] = array('facility' => array('apinger'), 'remote' => 'apinger'); $syslogconfs['portalauth'] = array('facility' => array('captiveportal'), 'remote' => 'portalauth'); $syslogconfs['ppps'] = array('facility' => array('ppp')); @@ -739,7 +739,6 @@ EOD; $syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "local3.*"); } if (isset($syslogcfg['dns'])) { - /* XXX needs testing */ $syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "local5.*"); } if (isset($syslogcfg['mail'])) { diff --git a/src/www/diag_logs_settings.php b/src/www/diag_logs_settings.php index f9b6e649d..1f99cdcea 100644 --- a/src/www/diag_logs_settings.php +++ b/src/www/diag_logs_settings.php @@ -41,6 +41,7 @@ function clear_all_log_files() $clog_files = array( 'dhcpd', + 'configd', 'filter', 'gateways', 'ipsec',