piedweb/logs-analyzer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

piedweb/logs-analyzer

Composer 安装命令:

composer require piedweb/logs-analyzer

包简介

Can parse, filter and export to CSV via PHP or CLI your APACHE/Nginx/Microsoft/WhatYouWant logs.

README 文档

README

Open Source Package

Logs Analyzer

Latest Version Software License GitHub Tests Action Status Quality Score Code Coverage Type Coverage Total Downloads

This package can parse, filter and export to CSV via PHP or CLI your APACHE/Nginx/Microsoft/WhatYouWant logs.

FR: https://piedweb.com/seo/logs

Install

Via Packagist

$ composer require piedweb/logs-analyzer

Usage

Tu use it directly in php, see bin/analyzer example.

Else, you can use the command tools to filter and export to CSV your log files. Get the last args list via --help :

bin/analyzer --help

About --format

Default parser work with Apache Access Logs :

^(?P<host>[a-zA-Z0-9\-\._:]+) (?P<logname>(?:-|[\w-]+)) (?P<user>(?:-|[\w\-\.]+)) \[(?P<time>\d{2}/(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/\d{4}:\d{2}:\d{2}:\d{2} (?:-|\+)\d{4})\] "(?P<request>(?:(?:[A-Z]+) .+? HTTP/(1\.0|1\.1|2\.0))|-|)" (?P<status>\d{3}|-) (?P<responseBytes>(\d+|-)) "(?P<HeaderReferer>.*?)" "(?P<HeaderUserAgent>.*?)"$

You can change the regex directly via the CLI or by creating a new Class managing your special format. Your new class must extends \PiedWeb\LogsAnalyzer\LogLine.

About --resume

This arg permits to have only unique request (requestMethod + url + status) keeping only the first date and time and counting the number of hit

Testing

$ composer test

Contributing

Please see contributing

Credits

License

The MIT License (MIT). Please see License File for more information.

Latest Version Software License Build Status Quality Score Code Coverage Total Downloads

统计信息

  • 总下载量: 11.29k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固