diff --git a/reviewboard/cmdline/rbext.py b/reviewboard/cmdline/rbext.py
index c78dc1c68014d089fe2ee8fcd5a3566c8f07e769..d85115d72a0149f814ea140b029e1f204ea5b7a4 100644
--- a/reviewboard/cmdline/rbext.py
+++ b/reviewboard/cmdline/rbext.py
@@ -16,6 +16,10 @@ import sys
 from importlib import import_module
 from textwrap import dedent
 
+
+logger = logging.getLogger(__name__)
+
+
 os.environ.setdefault(str('DJANGO_SETTINGS_MODULE'),
                       str('reviewboard.settings'))
 
@@ -958,9 +962,9 @@ class RBExt(object):
         try:
             return command.run(options)
         except Exception as e:
-            logging.exception('Unexpected exception when running command '
-                              '"%s": %s',
-                              command.name, e)
+            logger.exception('Unexpected exception when running command '
+                             '"%s": %s',
+                             command.name, e)
             return 1
         finally:
             sys.argv = old_argv
diff --git a/reviewboard/cmdline/rbssh.py b/reviewboard/cmdline/rbssh.py
index cb929919737603ad32ab2d00a3b887f61c1c8cda..b8d4559f2fcae31317c5227eb9ffcb2e52a48f47 100755
--- a/reviewboard/cmdline/rbssh.py
+++ b/reviewboard/cmdline/rbssh.py
@@ -40,6 +40,10 @@ import sys
 import warnings
 from optparse import OptionParser
 
+
+logger = logging.getLogger(__name__)
+
+
 if str('RBSITE_PYTHONPATH') in os.environ:
     for path in reversed(os.environ[str('RBSITE_PYTHONPATH')].split(str(':'))):
         sys.path.insert(1, path)
@@ -369,19 +373,19 @@ def main():
             break
         except paramiko.AuthenticationException as e:
             if attempts == 3 or not sys.stdin.isatty():
-                logging.error('Too many authentication failures for %s' %
-                              username)
+                logger.error('Too many authentication failures for %s'
+                             % username)
                 sys.exit(1)
 
             attempts += 1
             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)' %
-                          (e, type(e)))
+            logger.error('Unknown exception during connect: %s (%s)'
+                         % (e, type(e)))
             sys.exit(1)
 
     transport = client.get_transport()
