PHP Classes

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

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 136 All time: 9,277 This week: 73Up
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: 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 (6)  
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 (6)  /  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 (6)  /  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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:136
This week:0
All time:9,277
This week:73Up