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: 131 All time: 9,295 This week: 171Up
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 <contact>
Classes: 54 packages by
Country: India India
Innovation award
Innovation award
Nominee: 15x

Winner: 3x

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:131
This week:0
All time:9,295
This week:171Up