PHP Classes

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
2022-01-30 (13 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 57 All time: 10,087 This week: 196Up
Version License PHP version Categories
activitylog 1.0.1Custom (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.

Picture of Slawomir Kaleta
  Performance   Level  
Name: Slawomir Kaleta <contact>
Classes: 15 packages by
Country: Poland Poland
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

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:57
This week:0
All time:10,087
This week:196Up
For more information send a message to info at phpclasses dot org.