'."\n"; echo '
'."\n"; echo '
'."\n"; c_ws_plugin__s2member_menu_pages_tb::display(); echo '
'."\n"; echo '

Log Files

'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; do_action("ws_plugin__s2member_during_logs_page_before_left_sections", get_defined_vars()); if(apply_filters("ws_plugin__s2member_during_logs_page_during_left_sections_display_log_settings", TRUE, get_defined_vars())) { do_action("ws_plugin__s2member_during_logs_page_during_left_sections_before_log_settings", get_defined_vars()); echo '
'."\n"; echo '
'."\n"; echo '
'."\n"; echo '

We highly recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems that occur during processing. Enable logging here, and then view your log files below, in the s2Member Log Viewer.

'."\n"; echo '

However, it is recommended to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, API credentials, passwords and/or other sensitive information. We strongly suggest that logging be disabled on a live site (for security reasons) when not needed.

'."\n"; echo '

It is fine to enable logging on a live site for troubleshooting purposes. This is what the logs are meant for. Troubleshooting is not just done while building the site, they are sometimes needed after the site has been live a while and being used. Just remember to disable logging after you are done with it.

'."\n"; echo '

'."\n"; echo '
'."\n"; echo '
'."\n"; echo '

Regarding s2Member Security Badges. If debug logging is enabled, your site will not qualify for an s2Member Security Badge until you disable logging (and you must also download, and then delete any existing log files). For further details, please see KB Article: s2Member Security Badges.

'."\n"; echo '
'."\n"; echo '
'."\n"; do_action("ws_plugin__s2member_during_logs_page_during_left_sections_during_log_settings", get_defined_vars()); echo '
'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo '
'."\n"; echo '    
'."\n"; echo 'This enables logging overall. Includes s2Member HTTP, API, IPN and Return Page logging. Also logs any List Server integrations.
'."\n"; //260907.2203 Document the CSS/JS operational log with the setting that enables s2Member logging. echo 'The CSS/JS Asset Log (css-js.log) records important static and dynamic CSS/JS events such as generation, refreshes, delivery problems, fallbacks, and recovery. Routine page loads are not logged.
'."\n"; echo '* Logging can contain sensitive operational data. Enable it only when needed, review log access carefully, and disable it when troubleshooting is complete.
* The log files are stored here: '.esc_html(c_ws_plugin__s2member_utils_dirs::doc_root_path($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])).'
'."\n"; echo '
'."\n"; echo ''."\n"; echo '
'."\n"; echo '    
'."\n"; echo 'This enables HTTP connection logging for ALL of WordPress (quite extensive).
* Use only for debugging. This should NEVER be enabled on a live site.
* Creates the additional log file: wp-http-api-debug.log
'."\n"; echo '
'."\n"; echo '

'."\n"; echo ''."\n"; echo '

'."\n"; echo '
'."\n"; echo '
'."\n"; echo '
'."\n"; do_action("ws_plugin__s2member_during_logs_page_during_left_sections_after_log_settings", get_defined_vars()); } if(apply_filters("ws_plugin__s2member_during_logs_page_during_left_sections_display_logs", TRUE, get_defined_vars())) { do_action("ws_plugin__s2member_during_logs_page_during_left_sections_before_logs", get_defined_vars()); echo '
'."\n"; echo '
'."\n"; echo '

Debugging Tools/Tips & Other Important Details (click here to toggle)

'."\n"; echo ''."\n"; do_action("ws_plugin__s2member_during_logs_page_during_left_sections_during_logs", get_defined_vars()); $log_file_options = ""; // Initialize to an empty string. $view_log_file = (!empty($_POST["ws_plugin__s2member_log_file"])) ? sanitize_file_name($_POST["ws_plugin__s2member_log_file"]) : ""; //250422 Sanitize log file name. $view_log_file = (preg_match('/\.log$/i', $view_log_file)) ? $view_log_file : ""; $logs_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"]; if(is_dir($logs_dir)) // Do we have a logs directory on this installation? { $log_files = scandir($logs_dir); sort($log_files, SORT_STRING); $log_file_options .= ''; foreach($log_files as $_log_file) // Build options for each current log file. { $_log_file_description = array("short" => "No description available.", "long" => "No description available."); foreach(c_ws_plugin__s2member_utils_logs::$log_file_descriptions as $_k => $_v) if(preg_match($_k, $_log_file)) { $_log_file_description = $_v; break; // Stop here. } unset($_k, $_v); // Housekeeping. if(preg_match("/\.log$/", $_log_file) && stripos($_log_file, "-ARCHIVED-") === FALSE) $log_file_options .= ''; } unset($_log_file_description, $_log_file); // Housekeeping. $log_file_options .= ''; if(stripos($log_file_options, ''; } $log_file_options .= ''; if(stripos($log_file_options, ''. $log_file_options; echo '
'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; if($view_log_file && file_exists($logs_dir."/".$view_log_file) && filesize($logs_dir."/".$view_log_file)) { $_log_file_description = array("short" => "", "long" => ""); foreach(c_ws_plugin__s2member_utils_logs::$log_file_descriptions as $_k => $_v) if(preg_match($_k, $view_log_file)) { $_log_file_description = $_v; break; // Stop here. } unset($_k, $_v); // Housekeeping. if(!empty($_log_file_description["long"])) // Do we have a description that we can display here? echo '

Description for $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce("ws-plugin--s2member-download-log-file-v")))).'">'.esc_html($view_log_file).': '.esc_html($_log_file_description["long"]).'

'."\n"; unset($_log_file_description); // Just a little housekeeping here. echo '

Viewing: $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce("ws-plugin--s2member-download-log-file-v")))).'">'.esc_html($view_log_file).' (log entries oldest to newest)

'."\n"; echo '

[ $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce("ws-plugin--s2member-download-log-file-v")))).'">download file ]

'."\n"; echo '

⇓ expand viewport ⇓

'."\n"; echo ''."\n"; echo '

Viewing: $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce("ws-plugin--s2member-download-log-file-v")))).'">'.esc_html($view_log_file).' (log entries oldest to newest)

'."\n"; echo '

[ $view_log_file, "ws_plugin__s2member_download_log_file_v" => wp_create_nonce("ws-plugin--s2member-download-log-file-v")))).'">download file ]

'."\n"; echo '

⇓ expand viewport ⇓

'."\n"; } else if($view_log_file && file_exists($logs_dir."/".$view_log_file)) echo ''."\n"; else if($view_log_file && !file_exists($logs_dir."/".$view_log_file)) echo ''."\n"; else // Display an empty textarea in this default scenario. echo ''."\n"; echo '
'."\n"; echo '
'."\n"; echo '
'."\n"; echo '
'."\n"; do_action("ws_plugin__s2member_during_logs_page_during_left_sections_after_logs", get_defined_vars()); } do_action("ws_plugin__s2member_during_logs_page_after_left_sections", get_defined_vars()); echo '
'."\n"; c_ws_plugin__s2member_menu_pages_rs::display(); echo '
'."\n"; echo ''."\n"; } } } new c_ws_plugin__s2member_menu_page_logs();