GNOME Bugzilla – Bug 703231
[examples] Added SoupLogger to get example
Last modified: 2013-07-03 07:54:23 UTC
Now, instead of printing the debug information manually we use SoupLogger for this with the "-d" flag. Notice that we keep also the manual printing when using just the "-h" flag since this is an example and we want to show how to iterate over the message headers.
Created attachment 247959 [details] [review] [examples] Added SoupLogger to get example Now, instead of printing the debug information manually we use SoupLogger for this with the "-d" flag. Notice that we keep also the manual printing when using just the "-h" flag since this is an example and we want to show how to iterate over the message headers.
Comment on attachment 247959 [details] [review] [examples] Added SoupLogger to get example > Notice that we keep also the manual printing when > using just the "-h" flag since this is an example > and we want to show how to iterate over the > message headers. Nah, just use SoupLogger always. In general, we want the examples to show the *right* way to do things, or people will copy the wrong ways. :) (And simple-proxy shows how to iterate headers too anyway.) > static void >+log_printer (SoupLogger *logger, SoupLoggerLogLevel level, char direction, const char *data, gpointer user_data) >+{ >+ g_print ("Network LOG: %c %s\n", direction, data); >+} I don't think we really need that. Just use the default printer.
(In reply to comment #2) > Nah, just use SoupLogger always. In general, we want the examples to show the > *right* way to do things, or people will copy the wrong ways. :) > > (And simple-proxy shows how to iterate headers too anyway.) OK. > I don't think we really need that. Just use the default printer. OK.
Created attachment 248245 [details] [review] [examples] Added SoupLogger to get example Now, instead of printing the debug information manually we use SoupLogger for this with the "-d" flag.
Pushed to master