Changeset 402:b668511b4ac8 for src/mlx


Ignore:
Timestamp:
12/27/12 08:28:06 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Made the debug logging more detailed by adding the printout of the configuration and a few other stuff (re #170)

Location:
src/mlx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/config.py

    r401 r402  
    787787                config.write(f)
    788788            self._modified = False
     789
     790            print "Configuration saved:"
     791            self.log()
     792
    789793        except Exception, e:
    790794            print >> sys.stderr, "Failed to update config: " + \
     
    863867            return locale.getdefaultlocale()[0]
    864868
     869    def log(self):
     870        """Log the configuration by printing the values"""
     871        print "  pilot ID:", self._pilotID
     872        print "  rememberPassword:", self._rememberPassword
     873
     874        print "  language:", self._language
     875
     876        print "  hideMinimizedWindow:", self._hideMinimizedWindow
     877        print "  quitOnClose:", self._quitOnClose
     878
     879        print "  onlineGateSystem:", self._onlineGateSystem
     880        print "  onlineACARS:", self._onlineACARS
     881
     882        print "  flareTimeFromFS:", self._flareTimeFromFS
     883        print "  syncFSTime:", self._syncFSTime
     884        print "  usingFS2Crew:", self._usingFS2Crew
     885
     886        print "  iasSmoothingLength:", self._iasSmoothingLength
     887        print "  vsSmoothingLength:", self._vsSmoothingLength
     888
     889        print "  pirepDirectory:", self._pirepDirectory
     890        print "  pirepAutoSave:", self._pirepAutoSave
     891
     892        print "  enableSounds:", self._enableSounds
     893
     894        print "  pilotControlsSounds:", self._pilotControlsSounds
     895        print "  pilotHotkey:", str(self._pilotHotkey)
     896
     897        print "  enableApproachCallouts:", self._enableApproachCallouts
     898        print "  speedbrakeAtTD:", self._speedbrakeAtTD
     899
     900        print "  enableChecklists:", self._enableChecklists
     901        print "  checklistHotkey:", str(self._checklistHotkey)
     902
     903        print "  autoUpdate:", self._autoUpdate
     904        print "  updateURL:", self._updateURL
     905
     906        print "  messageTypeLevels:"
     907        for (type, level) in self._messageTypeLevels.iteritems():
     908            print "    %s: %s" % (const.messageType2string(type),
     909                                  const.messageLevel2string(level))
     910
     911        print "  checklists:"
     912        for (type, checklist) in self._checklists.iteritems():
     913            print "    %s:" % (const.icaoCodes[type],)
     914            for path in checklist:
     915                print "      " + path
     916
     917        print "  approachCallouts:"
     918        for (type, approachCallouts) in self._approachCallouts.iteritems():
     919            print "    %s:" % (const.icaoCodes[type],)
     920            for (altitude, path) in approachCallouts:
     921                print "      %d: %s" % (altitude, path)
     922
    865923#-------------------------------------------------------------------------------
  • src/mlx/gui/flight.py

    r401 r402  
    357357    def _offlineClicked(self, button):
    358358        """Called when the offline button was clicked."""
     359        print "mlx.flight.LoginPage: offline flight selected"
    359360        self._wizard.nextPage()
    360361
    361362    def _loginClicked(self, button):
    362363        """Called when the login button was clicked."""
     364        print "mlx.flight.LoginPage: logged in"
    363365        self._wizard.login(self._handleLoginResult,
    364366                           self._pilotID.get_text(),
  • src/mlx/mlx.py

    r377 r402  
    44from sound import initializeSound
    55from util import secondaryInstallation
     6from const import VERSION
    67
    78import os
     
    8283    sys.stderr = StdIOHandler(gui)
    8384
     85    print "MAVA Logger X " + VERSION + " debug log"
     86    print "The initial configuration:"
     87    config.log()
     88
    8489    initializeSound(os.path.join(programDirectory, "sounds"))
    8590
Note: See TracChangeset for help on using the changeset viewer.