Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Disable or capture log from go-vitess #490

Closed
jfontan opened this issue Oct 22, 2018 · 2 comments
Closed

Disable or capture log from go-vitess #490

jfontan opened this issue Oct 22, 2018 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jfontan
Copy link
Contributor

jfontan commented Oct 22, 2018

Vitess uses glog for logging and it sometimes writes information in between our logging:

INFO[0000] server started and listening on 0.0.0.0:3333 
INFO[0011] NewConnection: client 1                      
ERROR: logging before flag.Parse: W1022 11:38:05.781017   13955 server.go:310] Error authenticating user using MySQL native password: Access denied for user 'mysql_user3' (errno 1045) (sqlstate 28000)
INFO[0011] ConnectionClosed: client 1    

We could disable these lines using environment variables for glog or even better change the logging facility to use ours. This probably requires changing the logging stub when importing code:

https://github.com/src-d/go-vitess/blob/v1.2.0/vt/log/log.go

@erizocosmico
Copy link
Contributor

Didn't we have a script that replaced glog with logrus?

@jfontan
Copy link
Contributor Author

jfontan commented Oct 22, 2018

Not anymore. I suppose we can take it back:

031d7f7#diff-6b0d443d17b4c508f1f4808ec1ea8391R43

@ajnavarro ajnavarro added the bug Something isn't working label Oct 24, 2018
@erizocosmico erizocosmico self-assigned this Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants