PHPackages                             piedweb/logs-analyzer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. piedweb/logs-analyzer

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

piedweb/logs-analyzer
=====================

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

v0.0.2(5y ago)111.3k1MITPHPPHP ~7.1|^8.0

Since Jan 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/PiedWeb/LogsAnalyzer)[ Packagist](https://packagist.org/packages/piedweb/logs-analyzer)[ Docs](https://dev.piedweb.com)[ RSS](/packages/piedweb-logs-analyzer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

[![Open Source Package](https://raw.githubusercontent.com/PiedWeb/piedweb-devoluix-theme/master/src/img/logo_title.png)](https://dev.piedweb.com)

Logs Analyzer
=============

[](#logs-analyzer)

[![Latest Version](https://camo.githubusercontent.com/4514d2ef3f02b331ed4acc433b4d6a89cd9aaf1a868feebd3a966d7068c83575/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f506965645765622f4c6f6773416e616c797a65722e7376673f7374796c653d666c6174266c6162656c3d72656c65617365)](https://github.com/PiedWeb/LogsAnalyzer/tags)[![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](LICENSE)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f235910075776ee6376b1b7fb788ecad44b6c5725861ea4ce40b0745fb51cee4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f506965645765622f4c6f6773416e616c797a65722f54657374733f6c6162656c3d7465737473)](https://github.com/PiedWeb/LogsAnalyzer/actions)[![Quality Score](https://camo.githubusercontent.com/a01587e37323ea1df679ff726335bb5cc527ea9c9c9578c4ea43ad52846f89c2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f506965645765622f4c6f6773416e616c797a65722e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/PiedWeb/LogsAnalyzer)[![Code Coverage](https://camo.githubusercontent.com/1dfa865a54547a2e9bd52945cd00e9d010f6503d79f3f06983e9f38e3df7c789/68747470733a2f2f636f6465636f762e696f2f67682f506965645765622f4c6f6773416e616c797a65722f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/PiedWeb/LogsAnalyzer/branch/main)[![Type Coverage](https://camo.githubusercontent.com/c40c23d85113a43d606eb94ef5bf637fd8d85317369dc4421f0c0f2a4b72f86a/68747470733a2f2f73686570686572642e6465762f6769746875622f506965645765622f4c6f6773416e616c797a65722f636f7665726167652e737667)](https://shepherd.dev/github/PiedWeb/LogsAnalyzer)[![Total Downloads](https://camo.githubusercontent.com/d17cb0c0a1806d4fa40967c42f5416fbb310271b94afdf61d8ce24330b0a1574/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706965647765622f6c6f67732d616e616c797a65722e7376673f7374796c653d666c6174)](https://packagist.org/packages/piedweb/logs-analyzer)

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

FR:

Install
-------

[](#install)

Via [Packagist](https://packagist.org/packages/piedweb/logs-analyzer)

```
$ composer require piedweb/logs-analyzer
```

Usage
-----

[](#usage)

Tu use it directly in php, see [bin/analyzer](https://github.com/PiedWeb/LogsAnalyzer/blob/master/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`

[](#about---format)

Default parser work with Apache Access Logs :

```
^(?P[a-zA-Z0-9\-\._:]+) (?P(?:-|[\w-]+)) (?P(?:-|[\w\-\.]+)) \[(?P\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(?:(?:[A-Z]+) .+? HTTP/(1\.0|1\.1|2\.0))|-|)" (?P\d{3}|-) (?P(\d+|-)) "(?P.*?)" "(?P.*?)"$

```

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`

[](#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
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [contributing](https://dev.piedweb.com/contributing)

Credits
-------

[](#credits)

- [PiedWeb](https://piedweb.com)
- [All Contributors](https://github.com/PiedWeb/:package_skake/graphs/contributors)

License
-------

[](#license)

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

[![Latest Version](https://camo.githubusercontent.com/4514d2ef3f02b331ed4acc433b4d6a89cd9aaf1a868feebd3a966d7068c83575/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f506965645765622f4c6f6773416e616c797a65722e7376673f7374796c653d666c6174266c6162656c3d72656c65617365)](https://github.com/PiedWeb/LogsAnalyzer/tags)[![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/PiedWeb/LogsAnalyzer/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/0228250cdca4ef15ed8af958fa98852a3835db13abdf87b5ee7988ba9d88d089/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f506965645765622f4c6f6773416e616c797a65722f6d61737465722e7376673f7374796c653d666c6174)](https://travis-ci.org/PiedWeb/LogsAnalyzer)[![Quality Score](https://camo.githubusercontent.com/a01587e37323ea1df679ff726335bb5cc527ea9c9c9578c4ea43ad52846f89c2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f506965645765622f4c6f6773416e616c797a65722e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/PiedWeb/LogsAnalyzer)[![Code Coverage](https://camo.githubusercontent.com/7ac1d7965761c35f45747fd735f6098e7fe9d4d3a00dc2a05edcf0344e025dae/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f506965645765622f4c6f6773416e616c797a65722e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/PiedWeb/LogsAnalyzer/code-structure)[![Total Downloads](https://camo.githubusercontent.com/d17cb0c0a1806d4fa40967c42f5416fbb310271b94afdf61d8ce24330b0a1574/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706965647765622f6c6f67732d616e616c797a65722e7376673f7374796c653d666c6174)](https://packagist.org/packages/piedweb/logs-analyzer)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~720 days

Total

2

Last Release

1934d ago

PHP version history (2 changes)0.0.1PHP ~7.1

v0.0.2PHP ~7.1|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/afce4cf517928a50560237f1410d5957271fd808671b2216687ecf1422adaee0?d=identicon)[Robin D.](/maintainers/Robin%20D.)

---

Top Contributors

[![RobinDev](https://avatars.githubusercontent.com/u/3944894?v=4)](https://github.com/RobinDev "RobinDev (2 commits)")

---

Tags

logparserlogsnginxapachePied WebiisLogsAnalyzerlogs parser

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/piedweb-logs-analyzer/health.svg)

```
[![Health](https://phpackages.com/badges/piedweb-logs-analyzer/health.svg)](https://phpackages.com/packages/piedweb-logs-analyzer)
```

###  Alternatives

[kassner/log-parser

PHP Log Parser Library

342432.5k6](/packages/kassner-log-parser)[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3451.5M24](/packages/analog-analog)[jackiedo/log-reader

An easy log reader and management tool for Laravel

151376.5k4](/packages/jackiedo-log-reader)[benmorel/apache-log-parser

PHP library to parse Apache log files

266.6k](/packages/benmorel-apache-log-parser)[kabbouchi/laravel-ward

25364.1k1](/packages/kabbouchi-laravel-ward)[facile-it/sentry-module

This module allows integration of Sentry Client into laminas and mezzio

19372.5k](/packages/facile-it-sentry-module)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
