PHP Classes

PHP Logger class: Log messages with different levels of severity

Recommend this page to a friend!
  Info   View files Example   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-08-19 (6 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 115 All time: 8,980 This week: 384Up
Version License PHP version Categories
php-logger-class 1.0.0MIT/X Consortium ...5PHP 5, Logging
Description Author

This package can log messages with different levels of priority.

It can take a string as parameters with the message to log and append it to a log file according to a given severity level.

The package supports several levels of severity like emergency, alert, critical, error, warning, notice, info and debug.

Name: Malik umer Farooq is available for providing paid consulting. Contact Malik umer Farooq .
Classes: 42 packages by
Country: Pakistan Pakistan
Age: 17
All time rank: 126217 in Pakistan Pakistan
Week rank: 1 Up
Innovation award
Innovation award
Nominee: 2x


PHP Logger

Logging is one of the most ubiquitous tasks encountered in PHP. We use logs to track error messages, record important events, and debug problems with our code this class exectly do this.


  • PHP
  • Composer


run this command

## usage


use Lablnet\Logger;
require '../vendor/autoload.php';
$logger = new Logger;
$logger->debug("Hi im log msg and im {field}" , ['field' => 'debug']);

## Levels
- emergency => ```$logger->emergency(msg,[context])```
- alert => ```$logger->alert(msg,[context])```
- critical => ```$logger->emergency(msg,[critical])```
- error => ```$logger->error(msg,[context])```
- warning => ```$logger->warning(msg,[context])```
- notice => ```$logger->notice(msg,[context])```
- info => ```$logger->info(msg,[context])```
- debug => ```$logger->debug(msg,[context])```

# Note: .logs file will save in root of project directory 
  Files folder image Files  
File Role Description
Files folder imageexample (1 file)
Files folder imagesrc (3 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Read me first

  Files folder image Files  /  example  
File Role Description
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  src  
File Role Description
  Plain text file AbstractLogger.php Class Class source
  Plain text file Logger.php Class Class source
  Plain text file LogLevel.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,980
This week:384Up