Revision 054e60c0

b/kamaki/client.py
80 80
            headers['Content-Type'] = 'application/json'
81 81
            headers['Content-Length'] = len(body)
82 82
        
83
        log.debug('%s', '>' * 40)
83
        log.debug('>' * 50)
84 84
        log.debug('%s %s', method, path)
85

  
86 85
        for key, val in headers.items():
87 86
            log.debug('%s: %s', key, val)
88
        log.debug('')
89 87
        if body:
90
            log.debug(body)
91 88
            log.debug('')
89
            log.debug(body)
92 90
        
93 91
        conn.request(method, path, body, headers)
94

  
92
        
95 93
        resp = conn.getresponse()
96
        log.debug('%s', '<' * 40)
94
        buf = resp.read()
95
        
96
        log.debug('<' * 50)
97 97
        log.info('%d %s', resp.status, resp.reason)
98 98
        for key, val in resp.getheaders():
99 99
            log.info('%s: %s', key.capitalize(), val)
100 100
        log.info('')
101
        log.debug(buf)
102
        log.debug('-' * 50)
101 103
        
102
        buf = resp.read()
103 104
        try:
104 105
            reply = json.loads(buf) if buf else {}
105 106
        except ValueError:

Also available in: Unified diff