Feature #4311
Make http logging more verbose and exterenally customizable
Status: | Closed | Start date: | 09/16/2013 | |
---|---|---|---|---|
Priority: | Medium | Due date: | 09/16/2013 | |
Assignee: | Stavros Sachtouris | % Done: | 100% |
|
Category: | - | Spent time: | 3.00 hours | |
Target version: | - | Estimated time: | 2.00 hours |
Description
Before: http logging was of the form "Perform a GET request to <url> with ... headers and ... body", with a lot of omissions, especially in response.
Suggested:
GET <url>
<header>: <header value>
... (all headers - with token being hashed)
data size: 42
< 200 OK
< <header>: <header value>
< ...
< data size: 0
Also, move the control of log_body (flag to specify if the http request/response data are logged) from _call_astakos method to the constructor.
This will allow external software to handle whether they want data to be logged or not.
Please, do this in a way that does not disturb current astakosclient functionality.
Related issues
Associated revisions
Replace http log message with more verbose ones
Refs: #4311
Old log messages were of the form "Perform a GET request at ... with ..."
Now, the messages are of the form:
GET <url>
<header>: <header value>
...
data size: 42
< 200 OK
< <header>: <header value>
< ...
< data size: 0
Note: the > and < symbols refer to Request and Response respectively and are
inspired by kamaki logs
Move log_body flag from _call_astakos to init
Refs: #4311
log_body becomes (a) a init param defaulting to True and (b) a member variable
_call_astakos looses log_body as a param.
Move flag log_body from _call_astakos to init
Refs: #4311
Explanation: log_body en/disables http data logging.
Make it a member var + init argument, to allow callers to customize it
Defaults to True
Warning: method _get_endpoints forces this to False for security reasons
Changes have been applied to recover self.log_body in that case
Also, this method should be avoided
History
#1 Updated by Stavros Sachtouris almost 11 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
#2 Updated by Stavros Sachtouris almost 11 years ago
- Status changed from Resolved to Closed