previewtechs/http-access-logger
Composer 安装命令:
composer require previewtechs/http-access-logger
包简介
HTTP access logs saved to any storage provider.
关键字:
README 文档
README
Simple HTTP Access Logger
Simple but powerful HTTP access logger and usage monitoring. Mostly it will help to monitor API usage and anytime you can add your database storage to save all the usages.
Currently Google DataStore has been added as a Storage Provider. Everybody welcome to add more provider to it.
Usage
Install with composer require previewtechs/http-access-logger
<?php require "vendor/autoload.php"; //Setup your Google Datastore Gateway $gateway = new \GDS\Gateway\RESTv1('my-google-cloud-project-name'); $dataStore = new \GDS\Store('my-kind-name', $gateway); //Initialize storage provider $storage = new \Previewtechs\HTTP\AccessLogger\Providers\GoogleDataStore($dataStore); /** * Now start recording your HTTP access log by providign your storage provider and Psr/http-message ServerRequestInterface * compatible $request object */ $log = new \Previewtechs\HTTP\AccessLogger\AccessLog($request, $storage); $log->record();
For bug and issues please open an issue.
Contribution
Keep it simple but we can add more and more Storage provider like (MySQL, MongoDB and other storage);
To build a new provider please see src/Providers/GoogleDataStore.php
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-04-16