google / cloud-print-connector

Google Cloud Print Connector
BSD 3-Clause "New" or "Revised" License
764 stars 184 forks source link

HTTP and XMPP protocol logging #166

Open jay0lee opened 8 years ago

jay0lee commented 8 years ago

For troubleshooting purposes, it'd be useful to be able to log all HTTP and XMPP conversations.

Did some investigating and this is possible for HTTP with net/http/httputil: http://speakmy.name/2014/07/29/http-request-debugging-in-go/

I'll see about generating a pull request to log this in gcp/http.go.

jacobmarble commented 8 years ago

The XMPP conversation is already logged, just set the LogLevel to DEBUG.

agoode commented 7 years ago

Relatedly, I would be happy (for now) with CJT logging.

jacobmarble commented 7 years ago

@agoode define CJT logging.

agoode commented 7 years ago

I'd like to have an optional dump of the raw CJT (https://developers.google.com/cloud-print/docs/cdd#cjt) and payload from cloud print. Sometimes clients do odd things that we need to work around.

Probably we could define a dump output directory in the config (with a note that it is for debugging only), where all CJT and PDF files get written to as they come off the wire.