mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
reduce logging verbosity, set level to info
reviewed-by: Kishan
This commit is contained in:
parent
52202839fb
commit
47d01dbd3d
@ -51,14 +51,14 @@ class cloudConnection(object):
|
||||
|
||||
try:
|
||||
self.connection = urllib2.urlopen("http://%s:%d/client/api?%s"%(self.mgtSvr, self.port, requestUrl))
|
||||
self.logging.debug("sending request: %s"%requestUrl)
|
||||
self.logging.debug("sending GET request: %s"%requestUrl)
|
||||
response = self.connection.read()
|
||||
self.logging.debug("got response: %s"%response)
|
||||
self.logging.info("got response: %s"%response)
|
||||
except IOError, e:
|
||||
if hasattr(e, 'reason'):
|
||||
self.logging.debug("failed to reach %s because of %s"%(self.mgtSvr, e.reason))
|
||||
self.logging.critical("failed to reach %s because of %s"%(self.mgtSvr, e.reason))
|
||||
elif hasattr(e, 'code'):
|
||||
self.logging.debug("server returned %d error code"%e.code)
|
||||
self.logging.critical("server returned %d error code"%e.code)
|
||||
except HTTPException, h:
|
||||
self.logging.debug("encountered http Exception %s"%h.args)
|
||||
if self.retries > 0:
|
||||
@ -77,9 +77,9 @@ class cloudConnection(object):
|
||||
requestUrl = "&".join(["=".join([request[0], urllib.quote_plus(str(request[1]))]) for request in requests])
|
||||
|
||||
self.connection = urllib2.urlopen("http://%s:%d/client/api?%s"%(self.mgtSvr, self.port, requestUrl))
|
||||
self.logging.debug("sending request without auth: %s"%requestUrl)
|
||||
self.logging.debug("sending GET request without auth: %s"%requestUrl)
|
||||
response = self.connection.read()
|
||||
self.logging.debug("got response: %s"%response)
|
||||
self.logging.info("got response: %s"%response)
|
||||
return response
|
||||
|
||||
def pollAsyncJob(self, jobId, response):
|
||||
@ -135,15 +135,13 @@ class cloudConnection(object):
|
||||
i = i + 1
|
||||
|
||||
if self.logging is not None:
|
||||
self.logging.debug("sending command: %s %s"%(commandName, str(requests)))
|
||||
self.logging.info("sending command: %s %s"%(commandName, str(requests)))
|
||||
result = None
|
||||
if self.auth:
|
||||
result = self.make_request_with_auth(commandName, requests)
|
||||
else:
|
||||
result = self.make_request_without_auth(commandName, requests)
|
||||
|
||||
if self.logging is not None:
|
||||
self.logging.debug("got result: %s"%result)
|
||||
if result is None:
|
||||
return None
|
||||
|
||||
|
||||
@ -7,9 +7,6 @@ import logging
|
||||
from cloudstackAPI import *
|
||||
from optparse import OptionParser
|
||||
|
||||
module_logger = "testclient.deploy"
|
||||
|
||||
|
||||
class deployDataCenters():
|
||||
|
||||
def __init__(self, cfgFile):
|
||||
@ -316,11 +313,11 @@ class deployDataCenters():
|
||||
|
||||
testClientLogger = None
|
||||
if testClientLogFile is not None:
|
||||
testClientLogger = logging.getLogger("testclient.deploy.deployDataCenters")
|
||||
testClientLogger = logging.getLogger("testclient.testengine.run")
|
||||
fh = logging.FileHandler(testClientLogFile)
|
||||
fh.setFormatter(logging.Formatter("%(asctime)s - %(levelname)s - %(name)s - %(message)s"))
|
||||
testClientLogger.addHandler(fh)
|
||||
testClientLogger.setLevel(logging.DEBUG)
|
||||
testClientLogger.setLevel(logging.INFO)
|
||||
self.testClientLogger = testClientLogger
|
||||
|
||||
self.testClient = \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user