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   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-07-15 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: 24 All time: 11,222 This week: 43Up
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
Age: 55
All time rank: 19476 in Latvia Latvia
Week rank: 37 Up1 in Latvia Latvia Up
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 (3)  
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 (3)  /  src  
File Role Description
  Plain text file D3Monolog.php Class Class source

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  
 100%
Total:24
This week:0
All time:11,222
This week:43Up