lenoxzzedwin/simple-log
Composer 安装命令:
composer require 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
README 文档
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
统计信息
- 总下载量: 92
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-17