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 0f4ea92..aac5842 100644 (file)
@@ -1,5 +1,46 @@
 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
         https://bugs.webkit.org/show_bug.cgi?id=64053
 
index 5a5546c..2ed552c 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 e297891..72c9b20 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 6736de9..60153f8 100644 (file)
@@ -36,7 +36,7 @@ import logging
 import urllib2
 
 
-_log = logging.getLogger("webkitpy.common.net.statusserver")
+_log = logging.getLogger(__name__)
 
 
 class StatusServer:
index 6984403..b5c3bda 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 622cebd..fb853c8 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 aecb6ec..31b218c 100644 (file)
@@ -36,7 +36,7 @@ import sys
 import webbrowser
 
 
-_log = logging.getLogger("webkitpy.common.system.user")
+_log = logging.getLogger(__name__)
 
 
 try:
index 27fee6f..e7287ba 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 b0651d3..63f6d27 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 324e1b7..352d90b 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 111fbaa..0bb0638 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 17b3fae..225823d 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 d30a1dd..a3caaa1 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 7a15d22..cb1c27c 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 cd5ba1a..530acdc 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 b6cf1c7..961e686 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 34300f9..692746a 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 54aa052..3e6719d 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 435827b..04b05a9 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 2cae6e7..7e5619f 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 5b74cbc..bdfa684 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 0887c64..c623c9f 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 603df7f..009378c 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 74306bd..8f6c957 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 1c11df8..e40bd10 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 f43e80a..a0aa383 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 8b1f21b..b239217 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 95da76c..107bbc5 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 0665223..9e3d843 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 f44839d..6ac32de 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 256d081..01fffde 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):