{"id":20174789,"url":"https://github.com/gemorroj/logio","last_synced_at":"2025-04-10T03:45:39.439Z","repository":{"id":141738384,"uuid":"89132500","full_name":"Gemorroj/Logio","owner":"Gemorroj","description":"log parser","archived":false,"fork":false,"pushed_at":"2025-03-03T18:16:01.000Z","size":365,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T05:03:23.031Z","etag":null,"topics":["apache-log","log-parser","mysql-log","nginx-log","php-fpm-log","php-log"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gemorroj.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-23T10:00:15.000Z","updated_at":"2025-03-03T18:16:05.000Z","dependencies_parsed_at":"2025-03-03T19:34:38.855Z","dependency_job_id":null,"html_url":"https://github.com/Gemorroj/Logio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gemorroj%2FLogio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gemorroj%2FLogio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gemorroj%2FLogio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gemorroj%2FLogio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gemorroj","download_url":"https://codeload.github.com/Gemorroj/Logio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154987,"owners_count":21056542,"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":["apache-log","log-parser","mysql-log","nginx-log","php-fpm-log","php-log"],"created_at":"2024-11-14T01:43:42.501Z","updated_at":"2025-04-10T03:45:39.429Z","avatar_url":"https://github.com/Gemorroj.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logio\n\n[![Continuous Integration](https://github.com/Gemorroj/Logio/workflows/Continuous%20Integration/badge.svg)](https://github.com/Gemorroj/Logio/actions?query=workflow%3A%22Continuous+Integration%22)\n\n### Log parser\n\nИз коробки поддерживаются:\n - apache\n - nginx\n - php\n - php-fpm\n - mysql\n\nДобавление нового парсера заключается в написании в конфигурации регулярных выражений для нового парсера.\n\n\n### Installation:\n```bash\ncomposer require gemorroj/logio\n```\n\n\n### Example: \n```php\n\u003c?php\n\n$config = Logio\\Config::createFromYaml('/path_to_config/config.yml');\n$logio = new Logio\\Logio($config);\n\n$parser = $logio-\u003erun('php');\nforeach ($parser as $data) {\n    print_r($data);\n    /*\n    Array\n    (\n        [date] =\u003e DateTime Object\n            (\n                [date] =\u003e 2017-02-22 06:11:51.000000\n                [timezone_type] =\u003e 3\n                [timezone] =\u003e Europe/Moscow\n            )\n    \n        [type] =\u003e PHP Warning\n        [message] =\u003e session_start(): open(/var/lib/php/session/sess_2u61qee1kg9p7rr69mgka5ddf4, O_RDWR) failed: Permission denied (13)\n        [file] =\u003e /var/www/forum/register.php\n        [line] =\u003e 2\n    )\n     */\n}\n```\n\n\n\n### TODO\nдобавить в конфиги новый параметр который, говорил бы о добавлении данных в массив до того момента. пока не сработает регулярка.\nНапример:\n```yml\nmysql:\n    path: 'tests/fixtures/mysql.log'\n    format:\n        date: '/^([0-9A-Z\\.\\-:]+) /'\n        thread: '/^(?:[0-9A-Z\\.\\-:]+) ([0-9]+) \\[/'\n        type: '/(?:[0-9]+) \\[(.+)\\] /'\n        message: '/ (?:[0-9]+ \\[.+\\] ){0,1}(.+)+/'\n    cast:\n        date: '\\DateTime'\n    append:\n        message: '/todo/'\n```\n\n```txt\n2016-03-01T22:22:38.769531Z 0 [Note] InnoDB: Progress in MB:\n 100 200\n2016-03-01T22:22:39.884951Z 0 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0\n```\n\nДолжно получиться 2 элемента массива, \" 100 200\" должны присоединиться к message предыдущей строки.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemorroj%2Flogio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemorroj%2Flogio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemorroj%2Flogio/lists"}