{"id":19398098,"url":"https://github.com/piedweb/logsanalyzer","last_synced_at":"2025-06-14T06:03:57.507Z","repository":{"id":57041410,"uuid":"168215083","full_name":"PiedWeb/LogsAnalyzer","owner":"PiedWeb","description":" [PHP] This package can parse, filter and export to CSV via PHP or CLI your APACHE/Nginx/Microsoft/WhatYouWant logs.","archived":false,"fork":false,"pushed_at":"2021-01-20T16:02:54.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T06:03:56.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dev.piedweb.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PiedWeb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-29T19:31:17.000Z","updated_at":"2021-01-20T15:33:46.000Z","dependencies_parsed_at":"2022-08-24T00:50:59.138Z","dependency_job_id":null,"html_url":"https://github.com/PiedWeb/LogsAnalyzer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/PiedWeb/LogsAnalyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiedWeb%2FLogsAnalyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiedWeb%2FLogsAnalyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiedWeb%2FLogsAnalyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiedWeb%2FLogsAnalyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PiedWeb","download_url":"https://codeload.github.com/PiedWeb/LogsAnalyzer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiedWeb%2FLogsAnalyzer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259768509,"owners_count":22908228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T11:04:52.737Z","updated_at":"2025-06-14T06:03:57.482Z","avatar_url":"https://github.com/PiedWeb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://dev.piedweb.com\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/PiedWeb/piedweb-devoluix-theme/master/src/img/logo_title.png\" width=\"200\" height=\"200\" alt=\"Open Source Package\" /\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n# Logs Analyzer\n\n[![Latest Version](https://img.shields.io/github/tag/PiedWeb/LogsAnalyzer.svg?style=flat\u0026label=release)](https://github.com/PiedWeb/LogsAnalyzer/tags)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE)\n[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/PiedWeb/LogsAnalyzer/Tests?label=tests)](https://github.com/PiedWeb/LogsAnalyzer/actions)\n[![Quality Score](https://img.shields.io/scrutinizer/g/PiedWeb/LogsAnalyzer.svg?style=flat)](https://scrutinizer-ci.com/g/PiedWeb/LogsAnalyzer)\n[![Code Coverage](https://codecov.io/gh/PiedWeb/LogsAnalyzer/branch/main/graph/badge.svg)](https://codecov.io/gh/PiedWeb/LogsAnalyzer/branch/main)\n[![Type Coverage](https://shepherd.dev/github/PiedWeb/LogsAnalyzer/coverage.svg)](https://shepherd.dev/github/PiedWeb/LogsAnalyzer)\n[![Total Downloads](https://img.shields.io/packagist/dt/piedweb/logs-analyzer.svg?style=flat)](https://packagist.org/packages/piedweb/logs-analyzer)\n\nThis package can parse, filter and export to CSV via PHP or CLI your APACHE/Nginx/Microsoft/WhatYouWant logs.\n\nFR: https://piedweb.com/seo/logs\n\n## Install\n\nVia [Packagist](https://packagist.org/packages/piedweb/logs-analyzer)\n\n```bash\n$ composer require piedweb/logs-analyzer\n```\n\n## Usage\n\nTu use it directly in php, see [bin/analyzer](https://github.com/PiedWeb/LogsAnalyzer/blob/master/bin/analyzer) example.\n\nElse, you can use the command tools to filter and export to CSV your log files. Get the last args list via `--help` :\n\n```bash\nbin/analyzer --help\n```\n\n### About `--format`\n\nDefault parser work with Apache Access Logs :\n\n```\n^(?P\u003chost\u003e[a-zA-Z0-9\\-\\._:]+) (?P\u003clogname\u003e(?:-|[\\w-]+)) (?P\u003cuser\u003e(?:-|[\\w\\-\\.]+)) \\[(?P\u003ctime\u003e\\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\u003crequest\u003e(?:(?:[A-Z]+) .+? HTTP/(1\\.0|1\\.1|2\\.0))|-|)\" (?P\u003cstatus\u003e\\d{3}|-) (?P\u003cresponseBytes\u003e(\\d+|-)) \"(?P\u003cHeaderReferer\u003e.*?)\" \"(?P\u003cHeaderUserAgent\u003e.*?)\"$\n```\n\nYou 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`.\n\n### About `--resume`\n\nThis arg permits to have only unique request (`requestMethod` + `url` + `status`) keeping only the first `date` and `time` and counting the number of `hit`\n\n## Testing\n\n```bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [contributing](https://dev.piedweb.com/contributing)\n\n## Credits\n\n- [PiedWeb](https://piedweb.com)\n- [All Contributors](https://github.com/PiedWeb/:package_skake/graphs/contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n\n[![Latest Version](https://img.shields.io/github/tag/PiedWeb/LogsAnalyzer.svg?style=flat\u0026label=release)](https://github.com/PiedWeb/LogsAnalyzer/tags)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/PiedWeb/LogsAnalyzer/blob/master/LICENSE)\n[![Build Status](https://img.shields.io/travis/PiedWeb/LogsAnalyzer/master.svg?style=flat)](https://travis-ci.org/PiedWeb/LogsAnalyzer)\n[![Quality Score](https://img.shields.io/scrutinizer/g/PiedWeb/LogsAnalyzer.svg?style=flat)](https://scrutinizer-ci.com/g/PiedWeb/LogsAnalyzer)\n[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/PiedWeb/LogsAnalyzer.svg?style=flat)](https://scrutinizer-ci.com/g/PiedWeb/LogsAnalyzer/code-structure)\n[![Total Downloads](https://img.shields.io/packagist/dt/piedweb/logs-analyzer.svg?style=flat)](https://packagist.org/packages/piedweb/logs-analyzer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiedweb%2Flogsanalyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiedweb%2Flogsanalyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiedweb%2Flogsanalyzer/lists"}