2017 © Pedro Peláez
 

library logtailminutes

Log extraction utility

image

objectified/logtailminutes

Log extraction utility

  • Wednesday, January 23, 2013
  • by objectified
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

logtailminutes

Dead simple, tiny utility to extract lines from log files based on time range. Usage:, (*1)

$tail = new LogTailMinutes(
    '/path/to/logfile',  // log file to extract files from
    'd/m/Y',            // date format used in the log file, see php.net/date
    10,                 // how many minutes to go back
    'now',              // time expression to start from, see php.net/strtotime
    '/path/to/egrep'    // path to egrep binary
);

// optionally, set a filter on the matching results (egrep compatible regex)
$tail->setFilterRegex('HTTP/1.1" (4|5)[0-9]{2}');

// get matched lines
$lines = $tail->getLines();

The Versions

23/01 2013

dev-master

9999999-dev http://github.com/objectified/logtailminutes

Log extraction utility

  Sources   Download

MIT

logging monitoring