Skip to content
Browse files

Add _setup_logging method

  • Loading branch information...
1 parent e886a94 commit 536e693c8a04c4dc9fc0399e9c819e3e8149c08e @dripton committed Aug 11, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 slugathon/gui/Connect.py
View
9 slugathon/gui/Connect.py
@@ -108,6 +108,12 @@ def __init__(self, playername, password, server_name, server_port,
self.show_all()
+ self._setup_logging(log_path)
+
+ if connect_now:
+ reactor.callWhenRunning(self.cb_connect_button_clicked)
+
+ def _setup_logging(self, log_path):
log_observer = log.PythonLoggingObserver()
log_observer.start()
formatter = logging.Formatter(
@@ -122,9 +128,6 @@ def __init__(self, playername, password, server_name, server_port,
logging.getLogger().addHandler(console_handler)
logging.getLogger().setLevel(logging.DEBUG)
- if connect_now:
- reactor.callWhenRunning(self.cb_connect_button_clicked)
-
def _init_playernames(self, playername):
self.playernames.update(prefs.load_playernames())
if not playername:

0 comments on commit 536e693

Please sign in to comment.
Something went wrong with that request. Please try again.