Thank You Very Much, it resolves my output capture issue.
Now content is saved in log file with the following format, is there any way to format that data while saving it a file. As you can see in the output below, in place of new line \n is printed.
{'content': '{\n "result": [\n {\n "_ref": "member/bxxxxxxxxxxxxxx, \n "config_addr_type": "IPV4", \n "host_name": "xxxxxxxxxxxxxxxxxxxxxx", \n "node_info": [\n {\n "ha_status": "NOT_CONFIGURED", \n "hwid": "892A5BA7A1CB4AA9BEAB99A3ECC81116", \n "hwmodel": "", \n "hwplatform": "KVM", \n "hwtype": "IB-V825", \n "lan2_physical_setting": {\n "auto_port_setting_enabled": true\n }, \n "lan_ha_port_setting": {\n "ha_port_setting": {\n "auto_port_setting_enabled": true, \n "speed": "10"\n }, \n "lan_port_setting": {\n "auto_port_setting_enabled": true\n }\n }, \n "mgmt_network_setting": {\n "address": "xxxxxxx", \n "gateway": "xxxxxxxx", \n "subnet_mask": "255.255.255.248"\n }, \n "mgmt_physical_setting": {\n "auto_port_setting_enabled": true\n }, \n "paid_nios": false, \n "physical_oid": "0", \n "service_status": [\n {\n "description": "Running", \n "service": "NODE_STATUS", \n "status": "WORKING"\n }, \n {\n "description": "2% - Primary drive usage is OK.", \n "service": "DISK_USAGE", \n "status": "WORKING"\n }, \n {\n "description": "10.250.169.140", \n "service": "ENET_LAN", \n "status": "WORKING"\n }, \n {\n "description": "xxxxxxx", \n "service": "ENET_LAN2", \n "status": "WORKING"\n }, \n {\n "description": "10.250.169.132", \n "service": "ENET_MGMT", \n "status": "WORKING"\n }, \n {\n "description": "3% - Data