PHP Classes

Simple class for logs: Log entries to files

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 392 All time: 6,634 This week: 571Up
Version License PHP version Categories
simple-class-for-log 1.0GNU General Publi...5.0PHP 5, Logging
Description 

Author

This class can log entries to files.

It can append log entry messages to given log files.

The log entries can include the current timestamp and the current script memory usage.

Picture of Stanislav Afanasiev
  Performance   Level  
Name: Stanislav Afanasiev is available for providing paid consulting. Contact Stanislav Afanasiev .
Classes: 2 packages by
Country: Russian Federation Russian Federation
Age: 35
All time rank: 116838 in Russian Federation Russian Federation
Week rank: 416 Up24 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 1x

Details

/** * 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>");

  Files folder image Files  
File Role Description
Accessible without login Plain text file Example.php Example Example use
Plain text file Logger.class.php Class Logger class
Accessible without login Plain text file README Doc. README

 Version Control Unique User Downloads Download Rankings  
 0%
Total:392
This week:0
All time:6,634
This week:571Up