diff --git a/pandora_console/.gitignore b/pandora_console/.gitignore index 14c3e02e3d..66b97267ac 100644 --- a/pandora_console/.gitignore +++ b/pandora_console/.gitignore @@ -6,7 +6,9 @@ attachment/collection attachment/files_repo include/config.php pandora_console.log +log/console.log enterprise *.bak audit.log +log/audit.log install_old.php diff --git a/pandora_console/extensions/pandora_logs.php b/pandora_console/extensions/pandora_logs.php index bbdac372cd..038997f156 100644 --- a/pandora_console/extensions/pandora_logs.php +++ b/pandora_console/extensions/pandora_logs.php @@ -69,7 +69,11 @@ function pandoralogs_extension_main() $logs_directory = (!empty($config['server_log_dir'])) ? io_safe_output($config['server_log_dir']) : '/var/log/pandora'; - view_logfile($config['homedir'].'/pandora_console.log'); + // Do not attempt to show console log if disabled. + if ($config['console_log_enabled']) { + view_logfile($config['homedir'].'/log/console.log'); + } + view_logfile($logs_directory.'/pandora_server.log'); view_logfile($logs_directory.'/pandora_server.error'); } diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index d28a5e43fe..bbf1fbc6d7 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -329,15 +329,18 @@ $table->data[$i++][1] = html_print_input_text( $table->data[$i][0] = __('Include agents manually disabled'); $table->data[$i++][1] = html_print_checkbox_switch('include_agents', 1, $config['include_agents'], true); -$table->data[$i][0] = __('Audit log directory'); -$table->data[$i++][1] = html_print_input_text('auditdir', io_safe_output($config['auditdir']), '', 30, 100, true); - $table->data[$i][0] = __('Set alias as name by default in agent creation'); $table->data[$i++][1] = html_print_checkbox_switch('alias_as_name', 1, $config['alias_as_name'], true); $table->data[$i][0] = __('Unique IP'); $table->data[$i++][1] = html_print_checkbox_switch('unique_ip', 1, $config['unique_ip'], true); +$table->data[$i][0] = __('Enable console log').ui_print_help_tip(__('Log location').': pandora_console/log/console.log', true); +$table->data[$i++][1] = html_print_checkbox_switch('console_log_enabled', 1, $config['console_log_enabled'], true); + +$table->data[$i][0] = __('Enable audit log').ui_print_help_tip(__('Log location').': pandora_console/log/audit.log', true); +$table->data[$i++][1] = html_print_checkbox_switch('audit_log_enabled', 1, $config['audit_log_enabled'], true); + echo '