Login   Register  
PHP Classes
elePHPant
Icontem

File: README

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Stanislav Afanasiev  >  Simple class for logs  >  README  >  Download  
File: README
Role: Documentation
Content type: text/plain
Description: README
Class: Simple class for logs
Log entries to files
Author: By
Last change:
Date: 3 years ago
Size: 725 bytes
 

Contents

Class file image Download
/**
 * Simple class for logs
 * @description: Example use
 */

 // include class
 require_once 'Logger.class.php';
 
 
 // create object of logger class
 
 // write in log.txt
 // log file be overwritten
 $obLog = new Logger('log.txt');
 // or
 // log file be NOT overwritten
 $obLog = new Logger('log.txt','r+');
 
 // log write
 // simple use
 // log write be date and memory use by default ( separator \n)
 $obLog->LogIt('Start script');
 
 // without memory use
 $obLog->LogIt('Start script',true,"\n","a+",false);
 
 // with r+ mode
  $obLog->LogIt('Start script',true,"\n","r+");
  
  // write in html file
  $obLog = new Logger('log.html');
  $obLog->LogIt('Start script',true,"<br>");