Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

A simple library for parsing monolog logfiles.

License

Notifications You must be signed in to change notification settings

Brightspot-Dev/monolog-parser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monolog Parser

Build Status Scrutinizer Code Quality

Latest Stable Version Total Downloads Latest Unstable Version License

A simple library for parsing monolog logfiles.

Installation

You can install the library using composer by adding pulse00/monolog-parser to your composer.json.

Usage

require_once 'path/to/vendor/autoload.php';
  
use Dubture\Monolog\Reader\LogReader;
    
$logFile = '/path/to/some/monolog.log';
$reader = new LogReader($logFile);
   
foreach ($reader as $log) {
    echo sprintf("The log entry was written at %s. \n", $log['date']->format('Y-m-d h:i:s'));
}
    
$lastLine = $reader[count($reader)-1];
echo sprintf("The last log entry was written at %s. \n", $lastLine['date']->format('Y-m-d h:i:s'));

About

A simple library for parsing monolog logfiles.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%