diff --git a/reviewboard/cmdline/rbext.py b/reviewboard/cmdline/rbext.py
index 21b0170aba8a2147a6d9f25097dfe7ab49e552b2..e79441f8654398f91aecca89cf507b64db25f2d8 100644
--- a/reviewboard/cmdline/rbext.py
+++ b/reviewboard/cmdline/rbext.py
@@ -21,6 +21,8 @@ os.environ.setdefault(str('DJANGO_SETTINGS_MODULE'),
 rbext_dir = os.path.abspath(os.path.dirname(__file__))
 sys.path.insert(0, os.path.join(rbext_dir, 'conf', 'rbext'))
 
+logger = logging.getLogger(__name__)
+
 import pkg_resources
 from django.utils.encoding import force_str
 from django.utils.translation import ugettext_lazy as _, ugettext
@@ -847,7 +849,7 @@ class RBExt(object):
         try:
             return command.run(options)
         except Exception as e:
-            logging.exception('Unexpected exception when running command '
+            logger.exception('Unexpected exception when running command '
                               '"%s": %s',
                               command.name, e)
             return 1
diff --git a/reviewboard/cmdline/rbssh.py b/reviewboard/cmdline/rbssh.py
index cb929919737603ad32ab2d00a3b887f61c1c8cda..06261609cbecacde692d1fb7944a060edeea466a 100755
--- a/reviewboard/cmdline/rbssh.py
+++ b/reviewboard/cmdline/rbssh.py
@@ -47,6 +47,8 @@ if str('RBSITE_PYTHONPATH') in os.environ:
 os.environ[str('DJANGO_SETTINGS_MODULE')] = \
     str('reviewboard.cmdline.conf.rbssh.settings')
 
+logger = logging.getLogger(__name__)
+
 import django
 import paramiko
 from django.utils import six
@@ -369,7 +371,7 @@ def main():
             break
         except paramiko.AuthenticationException as e:
             if attempts == 3 or not sys.stdin.isatty():
-                logging.error('Too many authentication failures for %s' %
+                logger.error('Too many authentication failures for %s' %
                               username)
                 sys.exit(1)
 
@@ -377,10 +379,10 @@ def main():
             password = getpass.getpass("%s@%s's password: " %
                                        (username, hostname))
         except paramiko.SSHException as e:
-            logging.error('Error connecting to server: %s' % e)
+            logger.error('Error connecting to server: %s' % e)
             sys.exit(1)
         except Exception as e:
-            logging.error('Unknown exception during connect: %s (%s)' %
+            logger.error('Unknown exception during connect: %s (%s)' %
                           (e, type(e)))
             sys.exit(1)
 
