Created on 02-03-2015 12:37 AM - edited 09-16-2022 02:20 AM
Hi
I enable debug logging in python scripts for installing and configuring the cluster.
import logging logging.basicConfig(format='%(asctime)s [%(levelname)s] [%(name)s][%(funcName)s:%(lineno)d] - %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__)
In http_client response I get only partial output printed:
2015-01-29 18:22:40,660 [DEBUG] [cm_api.http_client][execute:157] - GET http://cdm1b.ECS-Site-1.comverse.com:7180/api/v6/commands/153 2015-01-29 18:22:40,670 [DEBUG] [cm_api.http_client][invoke:72] - GET Got response: { "id" : 153, "name" : "Enab... 2015-01-29 18:22:45,676 [DEBUG] [cm_api.http_client][execute:157] - GET http://cdm1b.ECS-Site-1.comverse.com:7180/api/v6/commands/153 2015-01-29 18:22:45,686 [DEBUG] [cm_api.http_client][invoke:72] - GET Got response: { "id" : 153, "name" : "Enab... 2015-01-29 18:22:45,687 [DEBUG] [cm_api.http_client][execute:157] - POST http://cdm1b.ECS-Site-1.comverse.com:7180/api/v6/clusters/ECS-HBASE/services/yarn/commands/start 2015-01-29 18:22:46,281 [DEBUG] [cm_api.http_client][invoke:72] - POST Got response: { "id" : 161, "name" : "Yarn... 2015-01-29 18:22:46,281 [DEBUG] [cm_api.http_client][execute:157] - GET http://cdm1b.ECS-Site-1.comverse.com:7180/api/v6/commands/153
How can I get full response in the output ?
Thanks
Created on 02-12-2015 02:55 AM - edited 02-12-2015 03:25 AM
The length of the message is restricted to 32 characters, see [1] in the python API
To get the full POST/GET you can replace the line with
self._client.logger.debug("%s Got response: %s%s" % (method, body, ""))
[1] https://github.com/cloudera/cm_api/blob/master/python/src/cm_api/resource.py#L70-L72
Created on 02-12-2015 02:55 AM - edited 02-12-2015 03:25 AM
The length of the message is restricted to 32 characters, see [1] in the python API
To get the full POST/GET you can replace the line with
self._client.logger.debug("%s Got response: %s%s" % (method, body, ""))
[1] https://github.com/cloudera/cm_api/blob/master/python/src/cm_api/resource.py#L70-L72