PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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
 

Contents

Class file image Download
<?php
require_once('log_checker.class.php');


$lc = new log_checker();

$folders_to_scan = array("../retention",
           
"../vehicledb",
           
"../audithp",
           
"../logs",
           
"../abcdef");
                       
$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");
?>