PHP Classes


Recommend this page to a friend!
  Classes of Slawomir Kaleta   PHP PSR 3 Logger for Activities   Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP PSR 3 Logger for Activities
Log activities compliant with PSR 3
Author: By
Last change: Update of
Date: 2 years ago
Size: 1,443 bytes


Class file image Download


Latest Stable Version Latest Unstable Version License

Documentation available at

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