Skip to content

About

Rotating File Handler for Monolog

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rotating File Handler for Monolog

Handler for PHP logging library Monolog for rotating files automatically based on a specific size.

Features

  • Rotate files based on files size
  • Remove files more than the X

Installation

Install the latest version with Composer

$ composer require sgoettsch/monolog-rotating-file-handler

Basic Usage

<?php

use sgoettsch\monologRotatingFileHandler\Handler\monologRotatingFileHandler;
use Monolog\Logger;

// path to log file
$filename = 'app.log';

// Instantiate handler
$handler = new monologRotatingFileHandler($filename);

// Create a log channel
$log = new Logger('name');

// Set handler
$log->pushHandler($handler);

// Add records to the log
$log->debug('Foo');
$log->warning('Bar');
$log->error('Baz');

Issues

Feel free to report any issues

About

Rotating File Handler for Monolog

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages