Commit a5e371ea authored by abarth@webkit.org's avatar abarth@webkit.org

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:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 21562410
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
......
......@@ -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
......
......@@ -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.
......
......@@ -36,7 +36,7 @@ import logging
import urllib2
_log = logging.getLogger("webkitpy.common.net.statusserver")
_log = logging.getLogger(__name__)
class StatusServer:
......
......@@ -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):
......
......@@ -32,7 +32,7 @@ import sys
import time
_log = logging.getLogger("webkitpy.common.system.file_lock")
_log = logging.getLogger(__name__)
class FileLock(object):
......
......@@ -36,7 +36,7 @@ import sys
import webbrowser
_log = logging.getLogger("webkitpy.common.system.user")
_log = logging.getLogger(__name__)
try:
......
......@@ -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 = ");"
......
......@@ -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):
......
......@@ -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
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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:
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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
......
......@@ -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
......
......@@ -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"
......
......@@ -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
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment