1. Go to this page and download the library: Download ruesin/utils library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
//初始化配置,log_path为日志存储目录,unique_id为日志文件唯一标识,默认为当前进程号。
Log::init(['log_path' => '/your-log-path/', 'unique_id' => '123']);
//向 /your-log-path/ruesin/default.log 文件追加写入 This is my message!
Log::msg('This is my message!', 'default', 'ruesin');
//向 /your-log-path/ruesin/info.log 文件追加写入 [2019-01-14 22:53:00] This is my info!
Log::info('This is my info!', 'info', 'ruesin');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.