PHP code example of rexwsd / laravel-log
1. Go to this page and download the library: Download rexwsd/laravel-log 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/ */
rexwsd / laravel-log example snippets
" "rexwsd/laravel-log": "0.*"
}
$app->register(\Laravel\Log\LogServiceProvider::class); //Log
use Laravel\Log\Facades\Log;
Log::makeLogger('adapter.error')->error('消息入参', [
'paramater' => $this->options,
'payload'=> $data
]);
dotenv
================系统信息==================
[日志产生时间 : 2020-07-23 13:54:37,691602]
[级别 : INFO] [主机 : ddfeebc13ea6] [唯一 ID : 35e2cd981ee01be7e3dc0a47 ]
[日志产生自 : /data/wwwroot/official-accounts/app/Components/WeChat/Handlers/Base/MessageLogHandler.php : 第41行 ]
---------------记录信息开始-------------->
消息入参 :
{
"paramater": {
"signature": "824cefc369bfb237888347971a7651141d702359",
"timestamp": "1595483677",
"nonce": "1137759158",
"openid": "oGnh81nKwbMTiYxfPhLv2JAHIah8"
},
"payload": {
"ToUserName": "gh_7996f09b388b",
"FromUserName": "oGnh81nKwbMTiYxfPhLv2JAHIah8",
"CreateTime": "1595483677",
"MsgType": "event",
"Event": "subscribe",
"EventKey": null
}
}
<--------------记录信息结束---------------