Adjust io-level logging in gerrit/git drivers
Currently the logging for polling is verbose. Adjust it as follows: * In the git driver, don't list every ref we see, just log the count so we know it's working. * In the gerrit driver, move logging of some HTTP traffic to the "io" logger. * In the default logging configuration for the server, if the '-d' option is given, do not include "io" logging. The only way to get this extremely verbose data is now with a custom logging config. Change-Id: If0d5877f65296ee2a9f7f0298f8bc6664e6c2a4c
This commit is contained in:
parent
d1b95639b9
commit
1e04bdb4aa
|
@ -90,6 +90,10 @@ _DEFAULT_SERVER_LOGGING_CONFIG = {
|
||||||
'handlers': ['console'],
|
'handlers': ['console'],
|
||||||
'level': 'INFO',
|
'level': 'INFO',
|
||||||
},
|
},
|
||||||
|
'zuul.GerritConnection.io': {
|
||||||
|
'handlers': ['console'],
|
||||||
|
'level': 'WARN',
|
||||||
|
},
|
||||||
'sqlalchemy.engine': {
|
'sqlalchemy.engine': {
|
||||||
'handlers': ['console'],
|
'handlers': ['console'],
|
||||||
'level': 'WARN',
|
'level': 'WARN',
|
||||||
|
|
|
@ -612,7 +612,7 @@ class GerritConnection(BaseConnection):
|
||||||
verify=self.verify_ssl,
|
verify=self.verify_ssl,
|
||||||
auth=self.auth, timeout=TIMEOUT,
|
auth=self.auth, timeout=TIMEOUT,
|
||||||
headers={'User-Agent': self.user_agent})
|
headers={'User-Agent': self.user_agent})
|
||||||
self.log.debug('Received: %s %s' % (r.status_code, r.text,))
|
self.iolog.debug('Received: %s %s' % (r.status_code, r.text,))
|
||||||
if r.status_code != 200:
|
if r.status_code != 200:
|
||||||
raise Exception("Received response %s" % (r.status_code,))
|
raise Exception("Received response %s" % (r.status_code,))
|
||||||
ret = None
|
ret = None
|
||||||
|
@ -636,7 +636,7 @@ class GerritConnection(BaseConnection):
|
||||||
auth=self.auth, timeout=TIMEOUT,
|
auth=self.auth, timeout=TIMEOUT,
|
||||||
headers={'Content-Type': 'application/json;charset=UTF-8',
|
headers={'Content-Type': 'application/json;charset=UTF-8',
|
||||||
'User-Agent': self.user_agent})
|
'User-Agent': self.user_agent})
|
||||||
self.log.debug('Received: %s %s' % (r.status_code, r.text,))
|
self.iolog.debug('Received: %s %s' % (r.status_code, r.text,))
|
||||||
if r.status_code != 200:
|
if r.status_code != 200:
|
||||||
raise Exception("Received response %s" % (r.status_code,))
|
raise Exception("Received response %s" % (r.status_code,))
|
||||||
ret = None
|
ret = None
|
||||||
|
|
|
@ -116,7 +116,8 @@ class GitWatcher(threading.Thread):
|
||||||
try:
|
try:
|
||||||
for project in self.connection.projects:
|
for project in self.connection.projects:
|
||||||
refs = self.lsRemote(project)
|
refs = self.lsRemote(project)
|
||||||
self.log.debug("Read refs %s for project %s" % (refs, project))
|
self.log.debug("Read %s refs for project %s",
|
||||||
|
len(refs), project)
|
||||||
if not self.projects_refs.get(project):
|
if not self.projects_refs.get(project):
|
||||||
# State for this project does not exist yet so add it.
|
# State for this project does not exist yet so add it.
|
||||||
# No event will be triggered in this loop as
|
# No event will be triggered in this loop as
|
||||||
|
|
Loading…
Reference in New Issue