2011-07-06 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2011 04:11:33 +0000 (04:11 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2011 04:11:33 +0000 (04:11 +0000)
        Normalize callers of logging.getLogger to use __name__
        https://bugs.webkit.org/show_bug.cgi?id=64054

        Reviewed by Eric Seidel.

        Most callers were already using __name__.  This patch makes everyone
        consistent.

        * Scripts/webkitpy/common/checkout/diff_parser.py:
        * Scripts/webkitpy/common/checkout/scm/svn.py:
        * Scripts/webkitpy/common/net/statusserver.py:
        * Scripts/webkitpy/common/system/executive.py:
        * Scripts/webkitpy/common/system/file_lock.py:
        * Scripts/webkitpy/common/system/user.py:
        * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
        * Scripts/webkitpy/layout_tests/models/result_summary.py:
        * Scripts/webkitpy/layout_tests/models/test_expectations.py:
        * Scripts/webkitpy/layout_tests/port/chromium.py:
        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
        * Scripts/webkitpy/layout_tests/port/gtk.py:
        * Scripts/webkitpy/layout_tests/port/http_lock.py:
        * Scripts/webkitpy/layout_tests/port/mac.py:
        * Scripts/webkitpy/layout_tests/port/qt.py:
        * Scripts/webkitpy/layout_tests/port/server_process.py:
        * Scripts/webkitpy/layout_tests/port/webkit.py:
        * Scripts/webkitpy/layout_tests/port/win.py:
        * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
        * Scripts/webkitpy/layout_tests/servers/http_server.py:
        * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
        * Scripts/webkitpy/layout_tests/servers/websocket_server.py:
        * Scripts/webkitpy/layout_tests/views/printing.py:
        * Scripts/webkitpy/python24/versioning.py:
        * Scripts/webkitpy/style/checker.py:
        * Scripts/webkitpy/style/checkers/test_expectations.py:
        * Scripts/webkitpy/style/patchreader.py:
        * Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90534 268f45cc-cd09-0410-ab3c-d52691b4dbfc

31 files changed:
Tools/ChangeLog
Tools/Scripts/webkitpy/common/checkout/diff_parser.py
Tools/Scripts/webkitpy/common/checkout/scm/svn.py
Tools/Scripts/webkitpy/common/net/statusserver.py
Tools/Scripts/webkitpy/common/system/executive.py
Tools/Scripts/webkitpy/common/system/file_lock.py
Tools/Scripts/webkitpy/common/system/user.py
Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
Tools/Scripts/webkitpy/layout_tests/models/result_summary.py
Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
Tools/Scripts/webkitpy/layout_tests/port/chromium.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
Tools/Scripts/webkitpy/layout_tests/port/gtk.py
Tools/Scripts/webkitpy/layout_tests/port/http_lock.py
Tools/Scripts/webkitpy/layout_tests/port/mac.py
Tools/Scripts/webkitpy/layout_tests/port/qt.py
Tools/Scripts/webkitpy/layout_tests/port/server_process.py
Tools/Scripts/webkitpy/layout_tests/port/webkit.py
Tools/Scripts/webkitpy/layout_tests/port/win.py
Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py
Tools/Scripts/webkitpy/layout_tests/servers/http_server.py
Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py
Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py
Tools/Scripts/webkitpy/layout_tests/views/printing.py
Tools/Scripts/webkitpy/python24/versioning.py
Tools/Scripts/webkitpy/style/checker.py
Tools/Scripts/webkitpy/style/checkers/test_expectations.py
Tools/Scripts/webkitpy/style/patchreader.py
Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests.py

index 0f4ea92fa96191b2cb0777aa106228552fa9015d..aac58424602f1787bbca46f3ac4e4345b57b3d68 100644 (file)
@@ -1,3 +1,44 @@
+2011-07-06  Adam Barth  <abarth@webkit.org>
+
+        Normalize callers of logging.getLogger to use __name__
+        https://bugs.webkit.org/show_bug.cgi?id=64054
+
+        Reviewed by Eric Seidel.
+
+        Most callers were already using __name__.  This patch makes everyone
+        consistent.
+
+        * Scripts/webkitpy/common/checkout/diff_parser.py:
+        * Scripts/webkitpy/common/checkout/scm/svn.py:
+        * Scripts/webkitpy/common/net/statusserver.py:
+        * Scripts/webkitpy/common/system/executive.py:
+        * Scripts/webkitpy/common/system/file_lock.py:
+        * Scripts/webkitpy/common/system/user.py:
+        * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
+        * Scripts/webkitpy/layout_tests/models/result_summary.py:
+        * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+        * Scripts/webkitpy/layout_tests/port/gtk.py:
+        * Scripts/webkitpy/layout_tests/port/http_lock.py:
+        * Scripts/webkitpy/layout_tests/port/mac.py:
+        * Scripts/webkitpy/layout_tests/port/qt.py:
+        * Scripts/webkitpy/layout_tests/port/server_process.py:
+        * Scripts/webkitpy/layout_tests/port/webkit.py:
+        * Scripts/webkitpy/layout_tests/port/win.py:
+        * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
+        * Scripts/webkitpy/layout_tests/servers/http_server.py:
+        * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
+        * Scripts/webkitpy/layout_tests/servers/websocket_server.py:
+        * Scripts/webkitpy/layout_tests/views/printing.py:
+        * Scripts/webkitpy/python24/versioning.py:
+        * Scripts/webkitpy/style/checker.py:
+        * Scripts/webkitpy/style/checkers/test_expectations.py:
+        * Scripts/webkitpy/style/patchreader.py:
+        * Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests.py:
+
 2011-07-06  Adam Barth  <abarth@webkit.org>
 
         Move model classes out of layout_package and into models
index 5a5546cde72a3a794f4bb376523d06ae9897407c..2ed552c4555db72df16b212547f2c125ae301a04 100644 (file)
@@ -31,7 +31,7 @@
 import logging
 import re
 
-_log = logging.getLogger("webkitpy.common.checkout.diff_parser")
+_log = logging.getLogger(__name__)
 
 
 # FIXME: This is broken. We should compile our regexps up-front
index e2978911a00d9b12e5aca43aafb485aa6a6615c2..72c9b20a680771eddc864d00f5edb728b252a921 100644 (file)
@@ -41,6 +41,9 @@ from webkitpy.common.system import ospath
 from .scm import AuthenticationError, SCM, commit_error_handler
 
 
+_log = logging.getLogger(__name__)
+
+
 # A mixin class that represents common functionality for SVN and Git-SVN.
 class SVNRepository:
     def has_authorization_for_realm(self, realm, home_directory=os.getenv("HOME")):
@@ -310,7 +313,6 @@ class SVN(SCM, SVNRepository):
             svn_commit_args.extend(changed_files)
 
         if self.dryrun:
-            _log = logging.getLogger("webkitpy.common.system")
             _log.debug('Would run SVN command: "' + " ".join(svn_commit_args) + '"')
 
             # Return a string which looks like a commit so that things which parse this output will succeed.
index 6736de94b5177dc0ebd420a4d20807d09f730186..60153f8a93cf3b8f0c4fa116e4d416f68cb4a0fe 100644 (file)
@@ -36,7 +36,7 @@ import logging
 import urllib2
 
 
-_log = logging.getLogger("webkitpy.common.net.statusserver")
+_log = logging.getLogger(__name__)
 
 
 class StatusServer:
index 69844035d993c9418b680f1bb45d9c62af14e177..b5c3bda2c18cbdea60a5a760a60d68690c4122f4 100644 (file)
@@ -49,7 +49,7 @@ from webkitpy.common.system.filesystem import FileSystem
 from webkitpy.python24 import versioning
 
 
-_log = logging.getLogger("webkitpy.common.system")
+_log = logging.getLogger(__name__)
 
 
 class ScriptError(Exception):
index 622cebd8a54680c671f504114bccdf9ef611c17b..fb853c8fb4e695f13ab0cacb26b4314468ea397f 100644 (file)
@@ -32,7 +32,7 @@ import sys
 import time
 
 
-_log = logging.getLogger("webkitpy.common.system.file_lock")
+_log = logging.getLogger(__name__)
 
 
 class FileLock(object):
index aecb6ec3dd30917ac01df34dd41c58c3dc1e8fbb..31b218c2f5818a7033f19f29a698a0ec70a113d1 100644 (file)
@@ -36,7 +36,7 @@ import sys
 import webbrowser
 
 
-_log = logging.getLogger("webkitpy.common.system.user")
+_log = logging.getLogger(__name__)
 
 
 try:
index 27fee6f4a77ac6ff542dc5a08a7a604ec5b82201..e7287ba10b2a8f6845bddf5eddfb530465608d54 100644 (file)
@@ -40,7 +40,7 @@ import webkitpy.thirdparty.simplejson as simplejson
 # A JSON results generator for generic tests.
 # FIXME: move this code out of the layout_package directory.
 
-_log = logging.getLogger("webkitpy.layout_tests.layout_package.json_results_generator")
+_log = logging.getLogger(__name__)
 
 _JSON_PREFIX = "ADD_RESULTS("
 _JSON_SUFFIX = ");"
index b0651d3a9bb8dbd81d725595fe610878b3390930..63f6d27611f27f47ef21e24256045b8a86c2400d 100644 (file)
@@ -36,7 +36,7 @@ from webkitpy.layout_tests.models import test_expectations
 from webkitpy.layout_tests.models.test_expectations import TestExpectations
 
 
-_log = logging.getLogger(__file__)
+_log = logging.getLogger(__name__)
 
 
 class ResultSummary(object):
index 324e1b74537fdef924ea119f900b7eff7cb5741c..352d90b245d7970f5eafbc53c8ffdda9d723476e 100644 (file)
@@ -37,8 +37,9 @@ import re
 
 import webkitpy.thirdparty.simplejson as simplejson
 
-_log = logging.getLogger("webkitpy.layout_tests.layout_package."
-                         "test_expectations")
+
+_log = logging.getLogger(__name__)
+
 
 # Test expectation and modifier constants.
 # FIXME: range() starts with 0 which makes if expectation checks harder
index 111fbaa079001b1b600afc2f8004414793860a8d..0bb063819197f3075911bf2ccdcf5cdea530a4aa 100755 (executable)
@@ -51,7 +51,8 @@ from webkitpy.layout_tests.port import builders
 from webkitpy.layout_tests.servers import http_server
 from webkitpy.layout_tests.servers import websocket_server
 
-_log = logging.getLogger("webkitpy.layout_tests.port.chromium")
+
+_log = logging.getLogger(__name__)
 
 
 class ChromiumPort(Port):
index 17b3fae768783340f623f08017a4803d42e9447e..225823dc0628f0c7851c617c7c43bdfb7c47e8c0 100644 (file)
@@ -33,7 +33,8 @@ import logging
 
 import chromium
 
-_log = logging.getLogger("webkitpy.layout_tests.port.chromium_linux")
+
+_log = logging.getLogger(__name__)
 
 
 class ChromiumLinuxPort(chromium.ChromiumPort):
index d30a1dd8a099adb5e7b848097404d73e5317c7b4..a3caaa1907fe09e421f0006af8b0e56b50ef2fe5 100644 (file)
@@ -38,7 +38,8 @@ from webkitpy.layout_tests.port import chromium
 
 from webkitpy.common.system.executive import Executive
 
-_log = logging.getLogger("webkitpy.layout_tests.port.chromium_mac")
+
+_log = logging.getLogger(__name__)
 
 
 class ChromiumMacPort(chromium.ChromiumPort):
index 7a15d22daf0d389bd2d8e66cab67f1557dcb1465..cb1c27c68a7470dbda52e6cdc2b8dca3e5a08eef 100755 (executable)
@@ -34,7 +34,8 @@ import sys
 
 import chromium
 
-_log = logging.getLogger("webkitpy.layout_tests.port.chromium_win")
+
+_log = logging.getLogger(__name__)
 
 
 def os_version(windows_version=None):
index cd5ba1a48c6e80db667a7ac3734b33b4d4f82604..530acdcb49bd50b947586508974d0211b8b38fc7 100644 (file)
@@ -35,7 +35,8 @@ import subprocess
 
 from webkitpy.layout_tests.port import base, builders, server_process, webkit
 
-_log = logging.getLogger("webkitpy.layout_tests.port.gtk")
+
+_log = logging.getLogger(__name__)
 
 
 class GtkDriver(webkit.WebKitDriver):
index b6cf1c7986902c3081938595d805aa546984520e..961e68607d0f9bad6d68ee515ea7cd3026250949 100644 (file)
@@ -40,7 +40,7 @@ from webkitpy.common.system.file_lock import FileLock
 from webkitpy.common.system.filesystem import FileSystem
 
 
-_log = logging.getLogger("webkitpy.layout_tests.port.http_lock")
+_log = logging.getLogger(__name__)
 
 
 class HttpLock(object):
index 34300f9e08714cc7007e8f7d8f65c0f1eae4f0fd..692746ab9340c3925671eab0666581ce6b53983c 100644 (file)
@@ -34,7 +34,8 @@ import re
 
 from webkitpy.layout_tests.port.webkit import WebKitPort
 
-_log = logging.getLogger("webkitpy.layout_tests.port.mac")
+
+_log = logging.getLogger(__name__)
 
 
 def os_version(os_version_string=None, supported_versions=None):
index 54aa0524e74bbb4d4db17b3d0a6308b6a3e4306e..3e6719d784480d02e4747346092660d292ec1847 100644 (file)
@@ -35,7 +35,8 @@ import webkit
 
 from webkitpy.layout_tests.port.webkit import WebKitPort
 
-_log = logging.getLogger("webkitpy.layout_tests.port.qt")
+
+_log = logging.getLogger(__name__)
 
 
 class QtPort(WebKitPort):
index 435827ba4e69ed8ee45bfc15aff9c75008e0331b..04b05a9fc4633322cf45bcec4214f2a6d01bc4ef 100644 (file)
@@ -41,7 +41,8 @@ if sys.platform != 'win32':
 
 from webkitpy.common.system.executive import Executive, ScriptError
 
-_log = logging.getLogger(__file__)
+
+_log = logging.getLogger(__name__)
 
 
 class ServerProcess:
index 2cae6e7b5d03ab882e1c8d703a118620bd1b8df6..7e5619fdbfcb3de2a848bffae2135c15c9739a76 100644 (file)
@@ -43,7 +43,7 @@ from webkitpy.common.system.executive import ScriptError
 from webkitpy.layout_tests.port import builders, server_process, Port, Driver, DriverOutput
 
 
-_log = logging.getLogger(__file__)
+_log = logging.getLogger(__name__)
 
 
 class WebKitPort(Port):
index 5b74cbc3531f164feb0cafb68106a6f5beb3c0df..bdfa684df9dd944cbc6177c2d687240f60a46565 100644 (file)
@@ -32,7 +32,8 @@ import logging
 
 from webkitpy.layout_tests.port.webkit import WebKitPort
 
-_log = logging.getLogger(__file__)
+
+_log = logging.getLogger(__name__)
 
 
 class WinPort(WebKitPort):
index 0887c64249351f6c5fe8ab1ce3848a9584b312c6..c623c9f8debfef402844ccfda5e8eae5d0c8d2ce 100644 (file)
@@ -37,7 +37,8 @@ import sys
 
 from webkitpy.layout_tests.servers import http_server_base
 
-_log = logging.getLogger("webkitpy.layout_tests.servers.apache_http_server")
+
+_log = logging.getLogger(__name__)
 
 
 class LayoutTestApacheHttpd(http_server_base.HttpServerBase):
index 603df7ff9b2480f991962025aa21266bbc60af3d..009378caad78d988a1964f8ae570a563fe546619 100755 (executable)
@@ -36,7 +36,9 @@ import time
 
 from webkitpy.layout_tests.servers import http_server_base
 
-_log = logging.getLogger("webkitpy.layout_tests.servers.http_server")
+
+_log = logging.getLogger(__name__)
+
 
 class Lighttpd(http_server_base.HttpServerBase):
 
index 74306bdac503ef5d84a0a55c8d4ebde197b8fb6d..8f6c957484286546e1e179a44b94cec830166459 100755 (executable)
@@ -36,7 +36,8 @@ import sys
 import tempfile
 import time
 
-_log = logging.getLogger("webkitpy.layout_tests.servers.http_server_base")
+
+_log = logging.getLogger(__name__)
 
 
 class ServerError(Exception):
index 1c11df863f08e8e2eefc1667e38f6dda1bb71a7a..e40bd1012a3026d20c9c7c97d60ce8ac7fd4c62e 100644 (file)
@@ -37,11 +37,13 @@ import time
 from webkitpy.layout_tests.servers import http_server
 from webkitpy.layout_tests.servers import http_server_base
 
-_log = logging.getLogger("webkitpy.layout_tests.servers.websocket_server")
+_log = logging.getLogger(__name__)
+
 
 _WS_LOG_PREFIX = 'pywebsocket.ws.log-'
 _WSS_LOG_PREFIX = 'pywebsocket.wss.log-'
 
+
 _DEFAULT_WS_PORT = 8880
 _DEFAULT_WSS_PORT = 9323
 
index f43e80abc7a407290355360d4f12ad337ef39ce1..a0aa3836085db8d71c90aab3efc2a5b3cc2d12ce 100644 (file)
@@ -37,8 +37,9 @@ from webkitpy.common.net import resultsjsonparser
 from webkitpy.layout_tests.views.metered_stream import MeteredStream
 from webkitpy.layout_tests.models import test_expectations
 
-# FIXME: Change this to __file__ when we can fix test-webkitpy's logging configuration.
-_log = logging.getLogger("webkitpy.layout_tests.printer")
+
+_log = logging.getLogger(__name__)
+
 
 TestExpectations = test_expectations.TestExpectations
 
index 8b1f21be9b29eef1a2a0e333ba1918e82e9719b2..b239217dff04d6252f589be1c2a4963e9f353467 100644 (file)
@@ -25,7 +25,9 @@
 import logging
 import sys
 
-_log = logging.getLogger("webkitpy.python24.versioning")
+
+_log = logging.getLogger(__name__)
+
 
 # The minimum Python version the webkitpy package supports.
 _MINIMUM_SUPPORTED_PYTHON_VERSION = "2.5"
index 95da76c007e0e75213a77acc7543338d6983b4b0..107bbc5144fa7e3cc74f0b2ff955b7f0e9ea04b2 100644 (file)
@@ -49,7 +49,9 @@ from optparser import ArgumentParser
 from optparser import DefaultCommandOptionValues
 from webkitpy.style_references import configure_logging as _configure_logging
 
-_log = logging.getLogger("webkitpy.style.checker")
+
+_log = logging.getLogger(__name__)
+
 
 # These are default option values for the command-line option parser.
 _DEFAULT_MIN_CONFIDENCE = 1
index 0665223a8c27a875e0ba31722cf75e11a011181e..9e3d8435caa4e31d45937afcebec323e8d203661 100644 (file)
@@ -37,7 +37,8 @@ from common import TabChecker
 from webkitpy.style_references import port
 from webkitpy.style_references import test_expectations
 
-_log = logging.getLogger("webkitpy.style.checkers.test_expectations")
+
+_log = logging.getLogger(__name__)
 
 
 class ChromiumOptions(object):
index f44839d4a13aeea05fbd9e944ced0998339e5005..6ac32ded72e88009468175419552f230e162502d 100644 (file)
@@ -33,7 +33,7 @@ import logging
 from webkitpy.common.checkout.diff_parser import DiffParser
 
 
-_log = logging.getLogger("webkitpy.style.patchreader")
+_log = logging.getLogger(__name__)
 
 
 class PatchReader(object):
index 256d081391c9e15eab37ecad814b8acfb227752c..01fffdee9b6a2fd0c433ed5498bca0e7d2af7ca4 100755 (executable)
@@ -33,8 +33,8 @@ import re
 import sys
 from webkitpy.common.checkout import scm
 
-_log = logging.getLogger("webkitpy.layout_tests."
-                         "update-webgl-conformance-tests")
+
+_log = logging.getLogger(__name__)
 
 
 def remove_first_line_comment(text):