本文整理汇总了PHP中clear_clog函数的典型用法代码示例。如果您正苦于以下问题:PHP clear_clog函数的具体用法?PHP clear_clog怎么用?PHP clear_clog使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了clear_clog函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: clear_all_log_files
function clear_all_log_files()
{
killbyname('syslogd');
$clog_files = array('dhcpd', 'filter', 'gateways', 'ipsec', 'l2tps', 'lighttpd', 'ntpd', 'openvpn', 'poes', 'portalauth', 'ppps', 'pptps', 'relayd', 'resolver', 'routing', 'system', 'vpn', 'wireless');
$log_files = array('squid/access', 'squid/cache', 'squid/store');
foreach ($clog_files as $lfile) {
clear_clog("/var/log/{$lfile}.log", false);
}
foreach ($log_files as $lfile) {
clear_log("/var/log/{$lfile}.log", false);
}
system_syslogd_start();
killbyname('dhcpd');
services_dhcpd_configure();
}
示例2: TORT
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.
*/
require_once "guiconfig.inc";
require_once "system.inc";
require_once "interfaces.inc";
$system_logfile = '/var/log/system.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if (isset($_POST['clear'])) {
clear_clog($system_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
$pgtitle = array(gettext('System'), gettext('Log Files'), gettext('General'));
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
<section class="page-content-main">
示例3: clear_clog
POSSIBILITY OF SUCH DAMAGE.
*/
require_once "guiconfig.inc";
require_once "filter.inc";
require_once "filter_log.inc";
require_once "system.inc";
require_once "pfsense-utils.inc";
require_once "interfaces.inc";
$filter_logfile = '/var/log/filter.log';
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
} else {
$nentries = 50;
}
if (isset($_POST['clear'])) {
clear_clog($filter_logfile);
}
$pgtitle = array(gettext('Firewall'), gettext('Log Files'), gettext('Plain View'));
$shortcut_section = "firewall";
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
示例4: TORT
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.
*/
require_once "guiconfig.inc";
require_once "system.inc";
require_once "interfaces.inc";
$wireless_logfile = '/var/log/wireless.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($wireless_logfile);
}
$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Wireless"));
$shortcut_section = "wireless";
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
示例5: switch
switch ($vpntype) {
case 'pptp':
$logname = "pptps";
break;
case 'poes':
$logname = "poes";
break;
case 'l2tp':
$logname = "l2tps";
break;
}
if ($_POST['clear']) {
if ($mode != "raw") {
clear_clog("/var/log/vpn.log");
} else {
clear_clog("/var/log/{$logname}.log");
}
}
function dump_clog_vpn($logfile, $tail)
{
global $g, $config, $vpntype;
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
$logarr = "";
exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr);
foreach ($logarr as $logent) {
$logent = preg_split("/\\s+/", $logent, 6);
$llent = explode(",", $logent[5]);
$iftype = substr($llent[1], 0, 4);
if ($iftype != $vpntype) {
continue;
}
示例6: TORT
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.
*/
require_once "guiconfig.inc";
require_once "services.inc";
require_once "system.inc";
require_once "interfaces.inc";
$ntpd_logfile = '/var/log/ntpd.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($ntpd_logfile);
}
$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("NTP"));
$shortcut_section = "ntp";
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
示例7: TORT
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.
*/
require_once "guiconfig.inc";
require_once "system.inc";
require_once "interfaces.inc";
$routing_logfile = '/var/log/routing.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($routing_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
$pgtitle = array(gettext('System'), gettext('Log Files'), gettext('Routing'));
$shortcut_section = "routing";
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
示例8: TORT
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.
*/
require_once "guiconfig.inc";
require_once "services.inc";
require_once "system.inc";
require_once "interfaces.inc";
$relayd_logfile = '/var/log/relayd.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($relayd_logfile);
}
$pgtitle = array(gettext('Services'), gettext('Load Balancer'), gettext('Log File'));
$shortcut_section = 'relayd';
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
<section class="page-content-main">
<div class="container-fluid">
示例9: TORT
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.
*/
require_once "guiconfig.inc";
require_once "system.inc";
require_once "interfaces.inc";
$ppps_logfile = '/var/log/ppps.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($ppps_logfile);
}
$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("PPP"));
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
示例10: array
POSSIBILITY OF SUCH DAMAGE.
*/
require_once "guiconfig.inc";
require_once "vpn.inc";
require_once "services.inc";
require_once "system.inc";
require_once "interfaces.inc";
$pgtitle = array(gettext('Services'), gettext('OpenVPN'), gettext('Log File'));
$openvpn_logfile = '/var/log/openvpn.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($openvpn_logfile);
}
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php
示例11: clear_clog
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once "guiconfig.inc";
require_once "vpn.inc";
require_once "services.inc";
require_once "system.inc";
require_once "interfaces.inc";
$ipsec_logfile = '/var/log/ipsec.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($ipsec_logfile);
}
$pgtitle = array(gettext('VPN'), gettext('IPsec'), gettext('System Log'));
$shortcut_section = 'ipsec';
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
示例12: TORT
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.
*/
require_once "guiconfig.inc";
require_once "services.inc";
require_once "system.inc";
require_once "interfaces.inc";
$dhcpd_logfile = '/var/log/dhcpd.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($dhcpd_logfile);
killbyname("dhcpd");
services_dhcpd_configure();
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("DHCP"));
$shortcut_section = "dhcp";
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
示例13: TORT
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.
*/
require_once "guiconfig.inc";
require_once "services.inc";
require_once "system.inc";
require_once "interfaces.inc";
$portal_logfile = '/var/log/portalauth.log';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($portal_logfile);
}
$pgtitle = array(gettext('Services'), gettext('Captive Portal'), gettext('Log File'));
include "head.inc";
?>
<body>
<?php
include "fbegin.inc";
?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">