Skip to content
/ log Public

✍️ Log message with time scale for standard levels

License

Notifications You must be signed in to change notification settings

seeren/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seeren\Log

Build Require Coverage Download Codacy Version

Log message with time scale for standard levels


Installation

Seeren\Log is a PSR-3 logger interfaces implementation

composer require seeren/log

Seeren\Log\Logger\Daily

Log message in a Daily, Monthly or Yearly generated file with optional data slug

use Seeren\Log\Logger\Daily;

$logger = new Daily();

By default, log folder is in /var/log

project/
└─ var/
   └─ log/

Project directory can be specified at construction

use Seeren\Log\Logger\Daily;

$logger = new Daily('..');

Log using levels

use Seeren\Log\Logger\Daily;

$logger = new Daily();
$logger->log('info', 'Bob is logged');

Pass slug and context optionnaly

use Seeren\Log\Logger\Daily;

$logger = new Daily();
$logger->log('error', 'Something happen: {message}', [
    'message' => 'Dummy message'
]);

License

This project is licensed under the MIT License

About

✍️ Log message with time scale for standard levels

Topics

Resources

License

Stars

Watchers

Forks

Languages