Bug 18342 - Add logging to HTTP soup backend
Summary: Add logging to HTTP soup backend
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-07 07:56 PDT by Xan Lopez
Modified: 2008-04-10 17:55 PDT (History)
3 users (show)

See Also:


Attachments
0001-Add-logging-to-http-soup-backend.patch (2.26 KB, patch)
2008-04-07 07:57 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff
0001-Add-logging-to-http-soup-backend.patch (2.12 KB, patch)
2008-04-07 10:03 PDT, Xan Lopez
no flags Details | Formatted Diff | Diff
0001-Add-logging-to-http-soup-backend.patch (2.10 KB, patch)
2008-04-07 10:05 PDT, Xan Lopez
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xan Lopez 2008-04-07 07:56:09 PDT
Patch attached.
Comment 1 Xan Lopez 2008-04-07 07:57:52 PDT
Created attachment 20381 [details]
0001-Add-logging-to-http-soup-backend.patch
Comment 2 Dan Winship 2008-04-07 09:50:16 PDT
You should unref the logger after attaching it to the session. (It doesn't really matter since the session is never destroyed anyway, so it doesn't actually cause a leak, but...)

Any reason you used two environment variables instead of just one?
Comment 3 Xan Lopez 2008-04-07 10:03:10 PDT
(In reply to comment #2)
> You should unref the logger after attaching it to the session. (It doesn't
> really matter since the session is never destroyed anyway, so it doesn't
> actually cause a leak, but...)

Right, actually thought about that after sending the patch... fixed in the next patch anyway.

> 
> Any reason you used two environment variables instead of just one?
> 

Not really, might be handy if it could be changed at run-time, but I guess there is no point right now (and you could still manage with one variable anyway).
Comment 4 Xan Lopez 2008-04-07 10:03:31 PDT
Created attachment 20382 [details]
0001-Add-logging-to-http-soup-backend.patch
Comment 5 Xan Lopez 2008-04-07 10:05:16 PDT
Created attachment 20383 [details]
0001-Add-logging-to-http-soup-backend.patch

Fix ChangeLog
Comment 6 Mark Rowe (bdash) 2008-04-07 10:36:42 PDT
What is the behaviour if I pass a value for WEBKIT_SOUP_LOGGING outside of the range 0-3?
Comment 7 Xan Lopez 2008-04-07 13:26:11 PDT
(In reply to comment #6)
> What is the behaviour if I pass a value for WEBKIT_SOUP_LOGGING outside of the
> range 0-3?
> 

As far as I understand the code the value is checked progressively against 0/1/2 and if it's not equal it's assumed to be the maximum verbosity value. We can clamp it here or, maybe better, soup should warn about invalid values.
Comment 8 Alp Toker 2008-04-10 17:53:17 PDT
Comment on attachment 20383 [details]
0001-Add-logging-to-http-soup-backend.patch

Think this is fine, no need to clamp. This will help debug the soup backend, r=me
Comment 9 Alp Toker 2008-04-10 17:55:36 PDT
Landed in r31792.