summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/status_logs.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/local/www/status_logs.php')
-rwxr-xr-xsrc/usr/local/www/status_logs.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/usr/local/www/status_logs.php b/src/usr/local/www/status_logs.php
index 5a30753..adf5ecc 100755
--- a/src/usr/local/www/status_logs.php
+++ b/src/usr/local/www/status_logs.php
@@ -156,6 +156,8 @@ $pconfig['logfilesize'] = $config['syslog'][$specific_log]['logfilesize'];
$pconfig['format'] = $config['syslog'][$specific_log]['format'];
# System General (main) Specific
+$pconfig['loglighttpd'] = !isset($config['syslog']['nologlighttpd']);
+
$save_settings = getGETPOSTsettingvalue('save_settings', null);
if ($save_settings) {
@@ -166,6 +168,9 @@ if ($save_settings) {
$logfilesize = getGETPOSTsettingvalue('logfilesize', null);
$format = getGETPOSTsettingvalue('format', null);
+ # System General (main) Specific
+ $loglighttpd = getGETPOSTsettingvalue('loglighttpd', null);
+
unset($input_errors);
$pconfig = $_POST;
@@ -207,6 +212,17 @@ if ($save_settings) {
$config['syslog'][$specific_log]['format'] = $format;
}
+ # System General (main) Specific
+ if ($logfile == 'system') {
+ $oldnologlighttpd = isset($config['syslog']['nologlighttpd']);
+ $config['syslog']['nologlighttpd'] = $loglighttpd ? false : true;
+
+ if ($oldnologlighttpd !== $config['syslog']['nologlighttpd']) {
+ $logging_changed = $lighttpd_logging_changed = true;
+ }
+ }
+
+
// If any of the logging settings were changed then backup and sync (standard write_config). Otherwise only write config (don't backup, don't sync).
if ($logging_changed) {
write_config($desc = "Log Display Settings Saved: " . gettext($allowed_logs[$logfile]["name"]), $backup = true, $write_config_only = false);
@@ -218,6 +234,16 @@ if ($save_settings) {
$savemsg = gettext("The changes have been applied successfully.");
+ # System General (main) Specific
+ if ($logfile == 'system') {
+ if ($lighttpd_logging_changed) {
+ ob_flush();
+ flush();
+ log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
+ send_event("service restart webgui");
+ $savemsg .= "<br />" . gettext("WebGUI process is restarting.");
+ }
+ }
}
}
@@ -607,6 +633,18 @@ $group->add(new Form_Checkbox(
$group->setHelp('Show the log entries as formatted or raw output as generated by the service. The raw output will reveal more detailed information, but it is more difficult to read.');
$section->add($group);
+
+# System General (main) Specific
+if ($logfile == 'system') {
+ $section->addInput(new Form_Checkbox(
+ 'loglighttpd',
+ 'Web Server Log',
+ 'Log errors from the web server process',
+ $pconfig['loglighttpd']
+ ))->setHelp('If this is checked, errors from the lighttpd web server process for the GUI or Captive Portal will appear in the system log.');
+}
+
+
$group = new Form_Group('Action');
$btnsavesettings = new Form_Button(
OpenPOWER on IntegriCloud