lenoxzzedwin / simple-log
A simple package for write in a file all messages and variables sets ,inspired by https://www.redips.net/php/write-to-log-file
Installs: 92
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/lenoxzzedwin/simple-log
This package is not auto-updated.
Last update: 2025-12-13 23:40:45 UTC
README
A simple package for write in a file all messages and variables sets inspired by https://www.redips.net/php/write-to-log-file
Installation
$ composer require lenoxzzedwin/simple-log
Basic Usage
<?php require __DIR__ . '/vendor/autoload.php'; // or your path use Lenoxzzedwin\SimpleLog\SimpleLog; $log = new SimpleLog(); $log->lfile('path'); //load file $log->lwrite(['hello','world']); // array $log->lwrite('Hello World'); // string $data = ['person' => ['name'=>'Edwin']]; $log->lwrite( (object) $data); //object ALL! $log->lclose();
file.txt
[Tue Feb 13 5:17:27 2018] (/tests/test.php) Array
(
[0] => hello
[1] => world
)
[Tue Feb 13 5:17:27 2018] (/tests/test.php) Hello World
[Tue Feb 13 5:17:27 2018] (/tests/test.php) stdClass Object
(
[person] => Array
(
[name] => Edwin
)
)
tail -f?
perfect for use with tail -f
License
MIT