llms_backup_logs()
Backup all log files in the LifterLMS log directory
Description Description
This function scans the LLMS_LOG_DIR
and passes each log file to llms_backup_log()
to create backups of each log file.
It does not include logs with the .log.bk
extension as those logs are logs created by this process and don’t need to be scanned again.
See also See also
Return Return
(void)
Source Source
File: includes/functions/llms.functions.log.php
function llms_backup_logs() { foreach ( glob( LLMS_LOG_DIR . '*.log' ) as $file ) { // Get the handle from the file path. $parts = explode( '-', basename( $file, '.log' ) ); if ( $parts ) { llms_backup_log( implode( '-', array_slice( $parts, 0, -1 ) ) ); } } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |