PUM_Utils_Logging::truncate_log()
Truncates a log file to maximum of 250 lines.
Description Description
Source Source
File: classes/Utils/Logging.php
public function truncate_log() { $content = $this->get_file(); $lines = explode( "\r\n", $content ); $lines = array_slice( $lines, 0, 250 ); //50 is how many lines you want to keep $this->content = implode( "\r\n", $lines ); $this->save_logs(); }
Expand full source code Collapse full source code View on Trac