Commit 5d19cbce authored by Ad Schellevis's avatar Ad Schellevis

(legacy) move clear_all_log_files to diag_logs_settings.php

parent ea5dd43a
......@@ -31,6 +31,27 @@ require_once("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("system.inc");
require_once("pfsense-utils.inc");
function clear_all_log_files()
{
killbyname('syslogd');
$log_files = array(
"system", "filter", "dhcpd", "vpn", "pptps", "poes", "l2tps", "openvpn", "portalauth",
"ipsec", "ppp", "relayd", "wireless", "lighttpd", "ntpd", "gateways", "resolver", "routing"
);
foreach ($log_files as $lfile) {
clear_log_file("/var/log/{$lfile}.log", false);
}
system_syslogd_start();
killbyname("dhcpd");
services_dhcpd_configure();
}
$pconfig['reverse'] = isset($config['syslog']['reverse']);
$pconfig['nentries'] = $config['syslog']['nentries'];
......
......@@ -375,24 +375,6 @@ function clear_log_file($logfile = '/var/log/system.log', $restart_syslogd = tru
}
}
function clear_all_log_files()
{
killbyname('syslogd');
$log_files = array(
"system", "filter", "dhcpd", "vpn", "pptps", "poes", "l2tps", "openvpn", "portalauth",
"ipsec", "ppp", "relayd", "wireless", "lighttpd", "ntpd", "gateways", "resolver", "routing"
);
foreach ($log_files as $lfile) {
clear_log_file("/var/log/{$lfile}.log", false);
}
system_syslogd_start();
killbyname("dhcpd");
services_dhcpd_configure();
}
function dump_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert = "") {
global $g, $config;
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment