PHP Classes

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Peter Pivarc  >  Log checker  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example of usage log checker
Class: Log checker
Truncate log files that exceed a limit size
Author: By
Last change:
Date: 5 years ago
Size: 491 bytes


Class file image Download

$lc = new log_checker();

$folders_to_scan = array("../retention",
$match_files = array(".log", ".txt");

//will save log to ../logs/logs_truncat.log, scan folders in array
//$folders_to_scan, will search for files with extension log and txt and
//shorten them to 25MB
$lc->init('../logs/logs_truncat.log', $folders_to_scan, $match_files, "25MB");