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

executor: change to structured slow log for friendly JSON output #4657

Merged
merged 9 commits into from Sep 29, 2017

Conversation

Projects
None yet
6 participants
@breeswish
Member

breeswish commented Sep 27, 2017

Hint: to output in JSON format, you need to use the following config:

[log]
format = "json"

Sample outputs after applying this PR

JSON format:

{"connectionId":1,"costTime":1000142797,"file":"adapter.go","level":"info","line":274,"msg":"query","sql":"select sleep(1)","time":"2017/09/27 14:20:47.209"}

Normal text format:

2017/09/27 14:27:02.535 adapter.go:274: [info] query costTime=1.0001397s sql=select sleep(1) connectionId=1

@shenli PTAL

@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood

coocood Sep 27, 2017

Member

LGTM

Member

coocood commented Sep 27, 2017

LGTM

@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli

shenli Sep 27, 2017

Member

LGTM

Member

shenli commented Sep 27, 2017

LGTM

coocood and others added some commits Sep 27, 2017

@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli
Member

shenli commented Sep 27, 2017

@winkyao PTAL

@shenli

This comment has been minimized.

Show comment
Hide comment
@shenli

shenli Sep 29, 2017

Member

/run-all-tests

Member

shenli commented Sep 29, 2017

/run-all-tests

@winoros

LGTM

@winoros winoros added status/LGT2 and removed status/LGT1 labels Sep 29, 2017

@shenli shenli merged commit 407719e into master Sep 29, 2017

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 72.732%
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@breeswish breeswish deleted the wenxuan/structured-slow-log branch Oct 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment