Bug 35821

Summary: python: Create a function for getting a module-specific logger
Product: WebKit Reporter: Chris Jerdonek <cjerdonek>
Component: Tools / TestsAssignee: Chris Jerdonek <cjerdonek>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, cjerdonek, eric, hamaji, levin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed patch abarth: review+, cjerdonek: commit-queue-

Chris Jerdonek
Reported 2010-03-05 17:02:21 PST
We should create a function for getting a logging.logger with the fully-qualified name of a module. That way we don't have to hard-code the fully-qualified module name in every module, like so-- _log = logging.getLogger("webkitpy.layout_tests.port.http_server_base") The function can probably go in webkitpy/init (soon to be something like webkit/infra). It will probably take something like __file__ as a parameter. Eric originally suggested this idea here: https://bugs.webkit.org/show_bug.cgi?id=35194#c11
Attachments
Proposed patch (10.28 KB, patch)
2010-03-06 22:43 PST, Chris Jerdonek
abarth: review+
cjerdonek: commit-queue-
Chris Jerdonek
Comment 1 2010-03-06 22:43:11 PST
Created attachment 50168 [details] Proposed patch
Adam Barth
Comment 2 2010-03-13 02:17:10 PST
Comment on attachment 50168 [details] Proposed patch Straightforward. I suppose the next step is to convert our existing call sites to the new hotness.
Chris Jerdonek
Comment 3 2010-03-22 05:52:19 PDT
(In reply to comment #2) > (From update of attachment 50168 [details]) > Straightforward. I suppose the next step is to convert our existing call sites > to the new hotness. Thanks again, Adam! Yes, I think that would be the natural next step.
Chris Jerdonek
Comment 4 2010-03-22 05:52:52 PDT
Manually committed after rebasing (via "git svn dcommit"): http://trac.webkit.org/changeset/56331
Note You need to log in before you can comment on or make changes to this bug.