chrisullyott / php-log
A dead-simple logger, storing data in JSON.
Installs: 7 349
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.6.0
Requires (Dev)
- phpunit/phpunit: ^5
README
A dead-simple logger, storing data in JSON.
Install
With Composer:
$ composer require chrisullyott/php-log
Instantiate
Set a path for the file.
$log = new ChrisUllyott\Log('data.json');
Adding items
set to store data by key:
$log->set('color', 'teal');
Retrieving items
get an item by key:
$log->get('color');
Deleting items
delete an item by key:
$log->delete('key');
reset to delete the entire database:
$log->reset();