query-log-tracer
A Python tool/library that traces a value in MySQL general logs.
Usage
Set up
$ pip install query-log-tracer
Example usage
./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.
$ query-log-tracer --log-file=./tests/files/general-query.log --target-table=dtb_customer --target-column=point --filter-column=id --filter-value=1
=== Searching in ./tests/files/general-query.log ===
2020-02-02T07:19:51.127168Z dtb_customer.point (id = 1) is set: '0'
2020-02-02T07:20:19.927027Z dtb_customer.point (id = 1) is set: '0'
2020-02-02T07:20:26.901577Z dtb_customer.point (id = 1) is set: '100'
2020-02-02T07:20:31.034901Z dtb_customer.point (id = 1) is set: '1000'
2020-02-02T07:20:39.396236Z dtb_customer.point (id = 1) is set: '2000'
2020-02-02T07:20:46.379143Z dtb_customer.point (id = 1) is set: '0'
2020-02-02T07:26:37.443522Z dtb_customer.point (id = 1) is set: '0'
2020-02-02T07:26:55.216881Z dtb_customer.point (id = 1) is set: '0'
2020-02-02T07:27:13.008757Z dtb_customer.point (id = 1) is set: '50'
2020-02-02T07:28:01.128957Z dtb_customer.point (id = 1) is set: '0'
2020-02-02T07:28:09.995354Z dtb_customer.point (id = 1) is set: '0'
2020-02-02T07:28:14.172518Z dtb_customer.point (id = 1) is set: '27'
2020-02-02T07:33:41.745400Z dtb_customer.point (id = 1) changes: +500
For EC-CUBE 2, try the following command.
$ query-log-tracer --log-dir=your-directory --target-table=dtb_customer --target-column=point --filter-column=customer_id --filter-value=1
Metadata
Release files for query-log-tracer 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| query-log-tracer-0.0.1.tar.gz | 10.6 kB | Without provenance | Details for query-log-tracer-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| query_log_tracer-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for query_log_tracer-0.0.1-py3-none-any.whl |
Total release size: 26.2 kB
Release files / query-log-tracer-0.0.1.tar.gz
| Download URL | query-log-tracer-0.0.1.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b610da0696920f20a81b17bcd63be0d315ce84aa5a8d8fa5c34061447c0f4656
|
|
BLAKE2b-256 checksum How to use checksums |
61661fb838c5da651d8d62b52f36e6c8c63299be06abbba67dd9473d4f917e3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
|
Release files / query_log_tracer-0.0.1-py3-none-any.whl
| Download URL | query_log_tracer-0.0.1-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
340370c44f426c700cd008466ef38ce805c993cf35c2437a0a437a1d52f36338
|
|
BLAKE2b-256 checksum How to use checksums |
104ad28864a5fe46028ef69523aebc1e5351dbe958fc7c77c02bab3d7c368ac9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
|
Security for query-log-tracer 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.