PHP Classes
elePHPant
Icontem

PHP PSR 3 Logger for Activities: Log activities compliant with PSR 3

Recommend this page to a friend!
  Info   View files Example   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-02-23 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 47 All time: 9,579 This week: 330Up
Version License PHP version Categories
activitylog 1.0.0Custom (specified...5PHP 5, Logging, PSR
Description Author

This package can be used to log activities compliant with PSR 3.

It can create a logger object that can take activity messages and format them to store in log files.

Another class provides an interface compliant with PSR 3 specification so it can push log messages to a queue and them output the queued log messages all at once to the log file handled by the logger class.

  Performance   Level  
Name: Slawomir Kaleta <contact>
Classes: 6 packages by
Country: Poland Poland
Age: ???
All time rank: 360882 in Poland Poland
Week rank: 126 Up3 in Poland Poland Up

 

Details

Dframe/ActivityLog

Latest Stable Version Latest Unstable Version License

Documentation available at https://dframeframework.com

Language Polish | English

Installation Composer

$ composer require dframe/activitylog

PSR-3 Adapter

use Dframe\ActivityLog\Activity;
use Dframe\ActivityLog\Demo\Drivers\PSR3FileLog;
use Dframe\ActivityLog\Helper\Psr3Adapter;
use Psr\Log\LogLevel;

require_once __DIR__ . '/../../vendor/autoload.php';

$log = new Activity(new PSR3FileLog());

$logger = new Psr3Adapter($log, 'System', \Dframe\ActivityLog\Entity\PSR3::class);
$logger->log(LogLevel::ERROR, 'This is {error}', ['error' => 'error #500']);

Standard Usage

use Dframe\ActivityLog\Activity;
use Dframe\ActivityLog\Demo\Drivers\FileLog;

require_once __DIR__ . '/../../vendor/autoload.php';

$log = (new Activity(new FileLog()));
$log->log('Hello Word!')->entity(\Dframe\ActivityLog\Demo\Entity\Action::class)->push();

Display Logs

$log->logs();
  Files folder image Files  
File Role Description
Files folder imagedemo (2 directories)
Files folder imagesrc (2 files, 2 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  demo  
File Role Description
Files folder imageapp (2 directories)
Files folder imageweb (1 file)

  Files folder image Files  /  demo  /  app  
File Role Description
Files folder imageDrivers (3 files)
Files folder imageEntity (3 files)

  Files folder image Files  /  demo  /  app  /  Drivers  
File Role Description
  Plain text file FileLog.php Class Class source
  Plain text file MysqlLogModel.php Class Class source
  Plain text file PSR3FileLog.php Class Class source

  Files folder image Files  /  demo  /  app  /  Entity  
File Role Description
  Plain text file Action.php Class Class source
  Plain text file Change.php Class Class source
  Plain text file Delete.php Class Class source

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

  Files folder image Files  /  src  
File Role Description
Files folder imageEntity (1 file)
Files folder imageHelper (1 file)
  Plain text file Activity.php Class Class source
  Plain text file Driver.php Class Class source

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

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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:47
This week:0
All time:9,579
This week:330Up