Improve logging for workerpool tasks by providing __repr__
Before it would log something like “starting task (<ganeti.http.client._HttpClientPendingRequest object at 0x2aaaad176790>,)”, which isn't really useful for debugging. Now it'll log “[…] <ganeti.http.client._HttpClientPendingRequest req=<ganeti.http.client.HttpClientRequest 172.24.x.y:1811 PUT /node_info at 0x2aaaaab7ed10> at 0x2aaaaab823d0>”. Signed-off-by:Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Loading
Please register or sign in to comment