PHP Classes

How to Use a PHP Log to File Class to Send Log Messages to Files Of Limited Size Using the Package D3 Logger: Log messages to files that rotate up to a limit

Recommend this page to a friend!
  Info   View files Documentation   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-07-15 (Yesterday) RSS 2.0 feedNot yet rated by the usersTotal: 14 This week: 14All time: 11,319 This week: 8Up
Version License PHP version Categories
d3logger 1.0Freeware8Files and Folders, Logging, PHP 8
Description 

Author

This package can log messages to files that rotate up to a limit.

It calls the Monolog class to log messages of different types like info, debug, notice, warning, error, critical, alert, and emergency.

The log messages are stored in a given directory and automatically rotate to create multiple log files.

The package is configured to limit the number of stored log files. Older log files are deleted when the log file limit is reached.

Picture of Uldis Nelsons
Name: Uldis Nelsons <contact>
Classes: 19 packages by
Country: Latvia Latvia
Innovation award
Innovation award
Nominee: 12x

Winner: 2x

Documentation

Installation

create Monolog logs in runtime directory

composer require d3yii2/d3logger dev-master

In configuration file define only path

        'myLoggel=r' => [
            'class' => 'd3logger\D3Monolog',
            'name' => 'myLogger',
            'fileName' => 'robotex',
            'directory' => 'devices',
            'maxFiles' => 7,
        ],

Ussage

use d3logger\D3Monolog;

Yii::$app->myLogger->info('ok',['a','b']);


  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file D3Monolog.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:14
This week:14
All time:11,319
This week:8Up