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


Top ↑

Return Return

(void)


Top ↑

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 ) ) );
		}
	}

}


Top ↑

Changelog Changelog

Changelog
Version Description
4.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.