Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Admin_Page_Status::get_logs()
Retrieve an array of log files
Return Return
(array[]) Associative array of log files. The array key is the file "slug" and the value is the file's absolute path.
Source Source
File: includes/admin/class.llms.admin.page.status.php
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | private static function get_logs() { $result = array (); // Retrieve all the files in our log directory. $files = @scandir( LLMS_LOG_DIR ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- It's okay though. if ( ! empty ( $files ) ) { foreach ( $files as $key => $value ) { // Ignore directory dots, directories, and non .log files. if ( in_array( $value , array ( '.' , '..' ), true ) || is_dir ( $value ) || ! strstr ( $value , '.log' ) ) { continue ; } $result [ sanitize_title( $value ) ] = LLMS_LOG_DIR . $value ; } } // Add the site's debug.log or native error log file if it exists. $err_path = ini_get ( 'error_log' ); if ( $err_path ) { $result [ 'debug-log' ] = $err_path ; } return $result ; } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.37.14 | Add the WP debug.log file to the array if WP_DEBUG_LOG is enabled. |
3.11.2 | Introduced. |