PHP Classes

PHP Log Analyzer: Parse log files and extract its entries details

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 134 This week: 2All time: 9,288 This week: 84Up
Version License PHP version Categories
php-log-analyser 1Free For Educatio...5PHP 5, Logging
Description 

Author

This class can parse log files and extract its entries details.

It can open a list of log files and read their lines to parse and extract each log line entry value. The parsed log entries are returned in an array.

The class can read up to a given number of log lines from the start or from the end of each file.

Picture of Er. Rochak Chauhan
  Performance   Level  
Name: Er. Rochak Chauhan is available for providing paid consulting. Contact Er. Rochak Chauhan .
Classes: 54 packages by
Country: India India
Age: 45
All time rank: 21 in India India
Week rank: 50 Down3 in India India Down
Innovation award
Innovation award
Nominee: 15x

Winner: 4x

Example

<?php
require("PhpLogAnalyser.inc.php");

$obj=new PhpLogAnalyser();

$obj->setLogFile("/var/logs/apache2/error.log");
$obj->setLogFile("/var/logs/apache2/apache2/logs/access.log");
$obj->setLogFile("/var/www/htdocs/demoyii_app/protected/runtime/application.log");

//$obj->setLinesToBeRead(50);
//$obj->readFromEndOfFile(false);

/*
$result=$obj->getParsedLines();
echo "<pre>"; print_r($result);
*/

$obj->renderFileContents();
?>


  Files folder image Files  
File Role Description
Files folder imagecss (2 files)
Files folder imagejs (2 files)
Plain text file PhpLogAnalyser.inc.php Class Main Class
Accessible without login Plain text file example.php Example Example File

  Files folder image Files  /  css  
File Role Description
  Accessible without login Plain text file bootstrap-responsive.css Data Stylesheet
  Accessible without login Plain text file bootstrap.css Data Stylesheet

  Files folder image Files  /  js  
File Role Description
  Accessible without login Plain text file bootstrap.js Data Example File
  Accessible without login Plain text file jquery.min.js Data Javascript

 Version Control Unique User Downloads Download Rankings  
 0%
Total:134
This week:2
All time:9,288
This week:84Up