systemd / casync

Content-Addressable Data Synchronization Tool
1.5k stars 117 forks source link

Propagate log-level to protocol helpers #217

Closed gportay closed 2 years ago

gportay commented 5 years ago

This patchset adds some verbosity to the protocol helpers.

The two first pathes are minor changes.

The third patch propagates the --log-level options given to casync to casync-http. It is based on what is already done for option --rate-limit-bps.

The last patch adds some verbosity in libcurl. The HTTP request and response headers are printed to stderr.

$ casync --log-level debug extract http://localhost/file.caibx /dev/loop0
Acquiring http://localhost/file.caibx...
*   Trying ::1:80...
* TCP_NODELAY set
* Connected to localhost (::1) port 80 (#0)
> GET /file.caibx HTTP/1.1
Host: localhost
Accept: */*

* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/octet-stream
< Accept-Ranges: bytes
< ETag: "1904834653"
< Last-Modified: Mon, 17 Jun 2019 19:28:35 GMT
< Content-Length: 372224
< Date: Fri, 21 Jun 2019 01:30:23 GMT
< Server: lighttpd/1.4.54
< 
Setting min/avg/max chunk size: 16384 / 65536 / 262144
* Connection #0 to host localhost left intact
(...)
gportay commented 5 years ago

This is gentle ping for the maintainers ;)