Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trace all SQL statements and output with log #391

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

crazytaxii
Copy link
Contributor

@crazytaxii crazytaxii commented May 21, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Trace all SQL statements and output with log. It helps to identify the problem in SQL statement and optimize SQL.

Does this PR introduce a user-facing change?

{
    "client_ip": "127.0.0.1",
    "latency": "165549µs",
    "level": "info",
    "method": "PUT",
    "msg": "SUCCESS",
    "request_id": "20240521064902-926983",
    "sqls": [
        "SELECT * FROM `users` WHERE id = 4 ORDER BY `users`.`id` LIMIT 1",
        "UPDATE `users` SET `gmt_modified`='2024-05-21 06:49:02.518',`password`='$2a$10$PojR/UG0Rb40OIgVBHkUwOHvYsXnu1HSlOTm0bHEReSG/TE070Z2y',`resource_version`=2 WHERE id = 4 and resource_version = 1"
    ],
    "status_code": 200,
    "time": "2024-05-21T06:49:02.519617521-04:00",
    "uri": "/pixiu/users/4/password"
}

@caoyingjunz caoyingjunz merged commit 8a59015 into caoyingjunz:master Jun 4, 2024
2 checks passed
@crazytaxii crazytaxii deleted the dev branch June 4, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants