{"id":20949979,"url":"https://github.com/kotarot/query-log-tracer","last_synced_at":"2026-03-02T12:41:00.948Z","repository":{"id":47619425,"uuid":"237637967","full_name":"kotarot/query-log-tracer","owner":"kotarot","description":"A Python tool/library that traces a value in MySQL general logs.","archived":false,"fork":false,"pushed_at":"2021-08-21T12:34:51.000Z","size":111,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-15T04:51:49.680Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kotarot.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":"2020-02-01T15:52:09.000Z","updated_at":"2022-12-13T07:47:20.000Z","dependencies_parsed_at":"2022-09-26T22:20:33.250Z","dependency_job_id":null,"html_url":"https://github.com/kotarot/query-log-tracer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kotarot%2Fquery-log-tracer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kotarot%2Fquery-log-tracer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kotarot%2Fquery-log-tracer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kotarot%2Fquery-log-tracer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kotarot","download_url":"https://codeload.github.com/kotarot/query-log-tracer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225275225,"owners_count":17448384,"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-19T00:44:48.520Z","updated_at":"2026-03-02T12:41:00.885Z","avatar_url":"https://github.com/kotarot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# query-log-tracer\n\n[![PyPI](https://img.shields.io/pypi/v/query-log-tracer)](https://pypi.org/project/query-log-tracer/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/query-log-tracer)](https://pypi.org/project/query-log-tracer/)\n[![GitHub Repo Size](https://img.shields.io/github/repo-size/kotarot/query-log-tracer)](https://github.com/kotarot/query-log-tracer)\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/kotarot/query-log-tracer/Continuous%20Integration)](https://github.com/kotarot/query-log-tracer/actions?query=workflow%3AContinuous%20Integration)\n[![GitHub License](https://img.shields.io/github/license/kotarot/query-log-tracer)](https://github.com/kotarot/query-log-tracer/blob/main/LICENSE)\n\nA Python tool/library that traces a value in MySQL general logs.\n\n## Usage\n\n### Set up\n\n```\n$ pip install query-log-tracer\n```\n\n### Example usage\n\n`./tests/files/general-query.log` is a sample query log file of MySQL 5.7. Most of the queries are generated by EC-CUBE 4.\n\n```\n$ query-log-tracer --log-file=./tests/files/general-query.log --target-table=dtb_customer --target-column=point --filter-column=id --filter-value=1\n=== Searching in ./tests/files/general-query.log ===\n\n2020-02-02T07:19:51.127168Z dtb_customer.point (id = 1) is set: '0'\n2020-02-02T07:20:19.927027Z dtb_customer.point (id = 1) is set: '0'\n2020-02-02T07:20:26.901577Z dtb_customer.point (id = 1) is set: '100'\n2020-02-02T07:20:31.034901Z dtb_customer.point (id = 1) is set: '1000'\n2020-02-02T07:20:39.396236Z dtb_customer.point (id = 1) is set: '2000'\n2020-02-02T07:20:46.379143Z dtb_customer.point (id = 1) is set: '0'\n2020-02-02T07:26:37.443522Z dtb_customer.point (id = 1) is set: '0'\n2020-02-02T07:26:55.216881Z dtb_customer.point (id = 1) is set: '0'\n2020-02-02T07:27:13.008757Z dtb_customer.point (id = 1) is set: '50'\n2020-02-02T07:28:01.128957Z dtb_customer.point (id = 1) is set: '0'\n2020-02-02T07:28:09.995354Z dtb_customer.point (id = 1) is set: '0'\n2020-02-02T07:28:14.172518Z dtb_customer.point (id = 1) is set: '27'\n2020-02-02T07:33:41.745400Z dtb_customer.point (id = 1) changes: +500\n```\n\nFor EC-CUBE 2, try the following command.\n\n```\n$ query-log-tracer --log-dir=your-directory --target-table=dtb_customer --target-column=point --filter-column=customer_id --filter-value=1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkotarot%2Fquery-log-tracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkotarot%2Fquery-log-tracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkotarot%2Fquery-log-tracer/lists"}