Index: src/mlx/acft.py
===================================================================
--- src/mlx/acft.py	(revision 344)
+++ src/mlx/acft.py	(revision 345)
@@ -259,5 +259,5 @@
                                      aircraftState.windSpeed))
                 self._logRadios(aircraftState)
-                self._logV1R2()
+                self._logV1R2(aircraftState)
             elif newStage==const.STAGE_DESCENT or newStage==const.STAGE_LANDING:
                 self._logRadios(aircraftState)
@@ -396,5 +396,5 @@
             return str(speed) + " " + self._flight.getEnglishSpeedUnit()
 
-    def _logV1R2(self):
+    def _logV1R2(self, state = None):
         """Log the V1, Vr and V2 value either newly, or by updating the
         corresponding line."""
@@ -405,6 +405,8 @@
 
         if self._v1r2LineIndex is None:
+            if state is None:
+                state = self._aircraftState
             self._v1r2LineIndex = \
-                self.logger.message(self._aircraftState.timestamp, message)
+                self.logger.message(state.timestamp, message)
         else:
             self.logger.updateLine(self._v1r2LineIndex, message)
Index: src/mlx/gui/common.py
===================================================================
--- src/mlx/gui/common.py	(revision 302)
+++ src/mlx/gui/common.py	(revision 345)
@@ -297,5 +297,5 @@
     faultTag.set_property("foreground", "red")
     faultTag.set_property("weight", WEIGHT_BOLD)
-    buffer.get_tag_table().add(faultTag)    
+    buffer.get_tag_table().add(faultTag)
 
 #------------------------------------------------------------------------------
@@ -305,9 +305,16 @@
 
     If isFault is set, use the tag named 'fault'."""
+    insertTextBuffer(buffer, buffer.get_end_iter(), text, isFault)
+
+#------------------------------------------------------------------------------
+
+def insertTextBuffer(buffer, iter, text, isFault = False):
+    """Insert the given line into the given text buffer at the given iterator.
+
+    If isFault is set, use the tag named 'fault'."""
     if isFault:
-        buffer.insert_with_tags_by_name(buffer.get_end_iter(), text,
-                                        "fault")
+        buffer.insert_with_tags_by_name(iter, text, "fault")
     else:
-        buffer.insert(buffer.get_end_iter(), text)
-
-#------------------------------------------------------------------------------
+        buffer.insert(iter, text)
+
+#------------------------------------------------------------------------------
Index: src/mlx/gui/gui.py
===================================================================
--- src/mlx/gui/gui.py	(revision 304)
+++ src/mlx/gui/gui.py	(revision 345)
@@ -90,5 +90,5 @@
     def build(self, iconDirectory):
         """Build the GUI."""
-        
+
         self._mainWindow = window = gtk.Window()
         window.set_title(WINDOW_TITLE_BASE)
@@ -112,5 +112,5 @@
         self._notebook = gtk.Notebook()
         mainVBox.pack_start(self._notebook, True, True, 4)
-        
+
         self._wizard = Wizard(self)
         label = gtk.Label(xstr("tab_flight"))
@@ -131,7 +131,7 @@
         label.set_tooltip_text(xstr("tab_weight_help_tooltip"))
         self._notebook.append_page(self._weightHelp, label)
-        
+
         (logWidget, self._logView)  = self._buildLogWidget()
-        addFaultTag(self._logView.get_buffer())        
+        addFaultTag(self._logView.get_buffer())
         label = gtk.Label(xstr("tab_log"))
         label.set_use_underline(True)
@@ -144,5 +144,5 @@
         label.set_tooltip_text(xstr("tab_gates_tooltip"))
         self._notebook.append_page(self._fleetGateStatus, label)
-        
+
         (self._debugLogWidget, self._debugLogView) = self._buildLogWidget()
         self._debugLogWidget.show_all()
@@ -186,15 +186,15 @@
         """Get the main window of the GUI."""
         return self._mainWindow
-        
+
     @property
     def logger(self):
         """Get the logger used by us."""
         return self._logger
-        
+
     @property
     def simulator(self):
         """Get the simulator used by us."""
         return self._simulator
-        
+
     @property
     def flight(self):
@@ -211,5 +211,5 @@
         """Indicate if the user has logged in properly."""
         return self._wizard.loggedIn
-        
+
     @property
     def loginResult(self):
@@ -251,10 +251,10 @@
         """Get Zero-Fuel Weight calculated for the current flight."""
         return self._wizard.zfw
-        
+
     @property
     def filedCruiseAltitude(self):
         """Get cruise altitude filed for the current flight."""
         return self._wizard.filedCruiseAltitude
-        
+
     @property
     def cruiseAltitude(self):
@@ -271,5 +271,5 @@
         """Get the METAR of the deprature airport."""
         return self._wizard.departureMETAR
-        
+
     @property
     def arrivalMETAR(self):
@@ -281,5 +281,5 @@
         """Get the name of the departure runway."""
         return self._wizard.departureRunway
-        
+
     @property
     def sid(self):
@@ -291,15 +291,15 @@
         """Get the V1 speed calculated for the flight."""
         return self._wizard.v1
-        
+
     @property
     def vr(self):
         """Get the Vr speed calculated for the flight."""
         return self._wizard.vr
-        
+
     @property
     def v2(self):
         """Get the V2 speed calculated for the flight."""
         return self._wizard.v2
-        
+
     @property
     def arrivalRunway(self):
@@ -326,5 +326,5 @@
         """Get the Vref speed calculated for the flight."""
         return self._wizard.vref
-        
+
     @property
     def flightType(self):
@@ -360,5 +360,5 @@
                                     self._mainWindow)
             self._updater.start()
-        
+
         singleton.raiseCallback = self.raiseCallback
         gtk.main()
@@ -398,12 +398,12 @@
                                    type = MESSAGETYPE_ERROR,
                                    message_format = xstr("conn_failed"))
-    
+
         dialog.set_title(WINDOW_TITLE_BASE)
         dialog.format_secondary_markup(xstr("conn_failed_sec"))
-        
+
         dialog.add_button(xstr("button_cancel"), 0)
         dialog.add_button(xstr("button_tryagain"), 1)
         dialog.set_default_response(1)
-        
+
         result = dialog.run()
         dialog.hide()
@@ -413,5 +413,5 @@
         else:
             self.reset()
-        
+
     def disconnected(self):
         """Called when we have disconnected from the simulator."""
@@ -422,5 +422,5 @@
 
     def _disconnected(self):
-        """Called when we have disconnected from the simulator unexpectedly."""        
+        """Called when we have disconnected from the simulator unexpectedly."""
         self._statusbar.updateConnection(self._connecting, self._connected)
 
@@ -460,5 +460,5 @@
         result = dialog.run()
         dialog.hide()
-        
+
         if result==RESPONSETYPE_YES:
             self.reset()
@@ -507,23 +507,30 @@
 
         return True
-            
-    def addFlightLogLine(self, timeStr, line, isFault = False):
-        """Write the given message line to the log."""
-        gobject.idle_add(self._writeLog,
-                         formatFlightLogLine(timeStr, line),
-                         self._logView, isFault)
-
-    def updateFlightLogLine(self, index, timeStr, line):
-        """Update the line with the given index."""
-        gobject.idle_add(self._updateFlightLogLine, index,
-                         formatFlightLogLine(timeStr, line))
-
-    def _updateFlightLogLine(self, index, line):
-        """Replace the contents of the given line in the log."""
+
+    def insertFlightLogLine(self, index, timestampString, text, isFault):
+        """Insert the flight log line with the given data."""
+        gobject.idle_add(self._insertFlightLogLine, index,
+                         formatFlightLogLine(timestampString, text),
+                         isFault)
+
+    def _insertFlightLogLine(self, index, line, isFault):
+        """Perform the real insertion.
+
+        To be called from the event loop."""
+        buffer = self._logView.get_buffer()
+        lineIter = buffer.get_iter_at_line(index)
+        insertTextBuffer(buffer, lineIter, line, isFault = isFault)
+        self._logView.scroll_mark_onscreen(buffer.get_insert())
+
+    def removeFlightLogLine(self, index):
+        """Remove the flight log line with the given index."""
+        gobject.idle_add(self._removeFlightLogLine, index)
+
+    def _removeFlightLogLine(self, index):
+        """Perform the real removal."""
         buffer = self._logView.get_buffer()
         startIter = buffer.get_iter_at_line(index)
-        endIter = buffer.get_iter_at_line(index + 1)
+        endIter = buffer.get_iter_at_line(index+1)
         buffer.delete(startIter, endIter)
-        buffer.insert(startIter, line)
         self._logView.scroll_mark_onscreen(buffer.get_insert())
 
@@ -591,5 +598,5 @@
              (event.new_window_state&WINDOW_STATE_ICONIFIED)==0:
             self._mainWindow.present()
-            
+
     def raiseCallback(self):
         """Callback for the singleton handling code."""
@@ -630,5 +637,5 @@
             self._mainWindow.present()
         self._mainWindow.deiconify()
-            
+
     def toggleMainWindow(self):
         """Toggle the main window."""
@@ -679,5 +686,5 @@
         if self._stdioText:
             sys.__stderr__.write(self._stdioText)
-            
+
     def writeStdIO(self, text):
         """Write the given text into standard I/O log."""
@@ -758,5 +765,5 @@
         self._updatePlaneStatus = status
         self._updatePlaneGateNumber = gateNumber
-        
+
         self.webHandler.updatePlane(self._updatePlaneResultCallback,
                                     tailNumber, status, gateNumber)
@@ -799,5 +806,5 @@
             self._stdioText = ""
         if not text: return
-            
+
         lines = text.splitlines()
         if text[-1]=="\n":
@@ -809,5 +816,5 @@
         now = datetime.datetime.now()
         timeStr = "%02d:%02d:%02d: " % (now.hour, now.minute, now.second)
-            
+
         for line in lines:
             #print >> sys.__stdout__, line
@@ -833,10 +840,10 @@
         self._flight.aircraft = acft.Aircraft.create(self._flight)
         self._flight.aircraft._checkers.append(self)
-        
+
         if self._simulator is None:
             self._simulator = fs.createSimulator(const.SIM_MSFS9, self)
             fs.setupMessageSending(self.config, self._simulator)
             self._setupTimeSync()
-        
+
         self._flight.simulator = self._simulator
 
@@ -845,5 +852,5 @@
 
         self._connecting = True
-        self._simulator.connect(self._flight.aircraft)        
+        self._simulator.connect(self._flight.aircraft)
 
     def startMonitoring(self):
@@ -867,5 +874,5 @@
         """Build the main menu bar."""
         menuBar = gtk.MenuBar()
-        
+
         fileMenuItem = gtk.MenuItem(xstr("menu_file"))
         fileMenu = gtk.Menu()
@@ -965,5 +972,5 @@
 
         helpMenu.append(gtk.SeparatorMenuItem())
-        
+
         aboutMenuItem = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
         aboutMenuItem.set_use_stock(True)
@@ -982,5 +989,5 @@
             label = gtk.Label(xstr("tab_debug_log"))
             label.set_use_underline(True)
-            label.set_tooltip_text(xstr("tab_debug_log_tooltip"))        
+            label.set_tooltip_text(xstr("tab_debug_log_tooltip"))
             self._debugLogPage = self._notebook.append_page(self._debugLogWidget, label)
             self._notebook.set_current_page(self._debugLogPage)
@@ -1037,5 +1044,5 @@
             result = dialog.run()
             dialog.hide()
-        
+
         if result==RESPONSETYPE_YES:
             self._statusIcon.destroy()
@@ -1052,9 +1059,9 @@
         """Callback for editing the checklists."""
         self._checklistEditor.run()
-        
+
     def _editApproachCallouts(self, menuItem):
         """Callback for editing the approach callouts."""
         self._approachCalloutsEditor.run()
-        
+
     def _editPreferences(self, menuItem):
         """Callback for editing the preferences."""
@@ -1084,5 +1091,5 @@
             if pirepDirectory is not None:
                 dialog.set_current_folder(pirepDirectory)
-        
+
         result = dialog.run()
         dialog.hide()
@@ -1132,5 +1139,5 @@
                                            parent = self._mainWindow)
             dialog.set_modal(True)
-            
+
 
             filter = gtk.FileFilter()
@@ -1138,5 +1145,5 @@
             filter.add_pattern("*.pirep")
             dialog.add_filter(filter)
-            
+
             filter = gtk.FileFilter()
             filter.set_name(xstr("file_filter_all"))
@@ -1184,5 +1191,5 @@
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 0, 1)
-        
+
         label = gtk.Label(bookedFlight.callsign)
         labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
@@ -1197,5 +1204,5 @@
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 1, 2)
-        
+
         label = gtk.Label(str(bookedFlight.departureTime.date()))
         labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
@@ -1210,5 +1217,5 @@
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 2, 3)
-        
+
         label = gtk.Label(bookedFlight.departureICAO)
         labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
@@ -1223,5 +1230,5 @@
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 3, 4)
-        
+
         label = gtk.Label(bookedFlight.arrivalICAO)
         labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
@@ -1243,5 +1250,5 @@
         else:
             label.set_text("%.1f %%" % (rating,))
-        
+
         labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
@@ -1252,7 +1259,7 @@
         dialog.add_button(xstr("viewPIREP"), 1)
         dialog.add_button(xstr("sendPIREP"), RESPONSETYPE_OK)
-        
+
         return dialog
-                            
+
     def sendPIREP(self, pirep, callback = None):
         """Send the given PIREP."""
@@ -1287,5 +1294,5 @@
             messageFormat = xstr("sendPIREP_failed")
             secondaryMarkup = xstr("sendPIREP_failed_sec")
-        
+
         dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
                                    type = type, message_format = messageFormat)
@@ -1365,9 +1372,9 @@
             dialog.set_transient_for(self._mainWindow)
             dialog.set_modal(True)
-            
+
             logoPath = os.path.join(self._programDirectory, "logo.png")
             logo = pixbuf_new_from_file(logoPath)
             dialog.set_logo(logo)
-                                
+
             dialog.set_program_name(PROGRAM_NAME)
             dialog.set_version(const.VERSION)
@@ -1396,4 +1403,4 @@
 
     def _showAboutURL(self, dialog, link, user_data):
-        """Show the about URL."""        
+        """Show the about URL."""
         webbrowser.open(url = link, new = 1)
Index: src/mlx/logger.py
===================================================================
--- src/mlx/logger.py	(revision 315)
+++ src/mlx/logger.py	(revision 345)
@@ -6,4 +6,5 @@
 import sys
 import time
+import bisect
 
 #--------------------------------------------------------------------------------------
@@ -28,5 +29,127 @@
 
 class Logger(object):
-    """The class with the interface to log the various events."""
+    """The class with the interface to log the various events.
+
+    It contains a list of entries ordered by their timestamps and their ever
+    increasing IDs."""
+
+    class Entry(object):
+        """An entry in the log."""
+
+        # The ID of the next entry to be created
+        _nextID = 1
+
+        def __init__(self, timestamp, text, showTimestamp = True,
+                     faultID = None, faultScore = 0, id = None):
+            """Construct the entry."""
+            if id is None:
+                self._id = self._nextID
+                Logger.Entry._nextID += 1
+            else:
+                self._id = id
+
+            self._timestamp = timestamp
+            self._text = text
+            self._showTimestamp = showTimestamp
+
+            self._faultID = faultID
+            self._faultScore = faultScore
+
+        @property
+        def id(self):
+            """Get the ID of the entry."""
+            return self._id
+
+        @property
+        def timestamp(self):
+            """Get the timestamp of this entry."""
+            return self._timestamp
+
+        @property
+        def timestampString(self):
+            """Get the timestamp string of this entry.
+
+            It returns None, if the timestamp of the entry is not visible."""
+            return util.getTimestampString(self._timestamp) \
+                   if self._showTimestamp else None
+
+        @property
+        def text(self):
+            """Get the text of this entry."""
+            return self._text
+
+        @property
+        def isFault(self):
+            """Determine if this is a log entry about a fault."""
+            return self._faultID is not None
+
+        @property
+        def faultID(self):
+            """Get the fault ID of the entry.
+
+            It may be None, if the entry is not a fault entry."""
+            return self._faultID
+
+        @property
+        def faultScore(self):
+            """Get the fault score of the entry, if it is a fault."""
+            return self._faultScore
+
+        def copy(self, text = None):
+            """Create a copy of this entry with the given values changed."""
+            return Logger.Entry(self._timestamp,
+                                self._text if text is None else text,
+                                showTimestamp = self._showTimestamp,
+                                faultID = self._faultID,
+                                faultScore = self._faultScore,
+                                id = self._id)
+
+        def __cmp__(self, other):
+            """Compare two entries
+
+            First their timestamps are compared, and if those are equal, then
+            their IDs."""
+            result = cmp(self._timestamp, other.timestamp)
+            if result==0:
+                result = cmp(self._id, other._id)
+            return result
+
+    class Fault(object):
+        """Information about a fault.
+
+        It contains the list of log entries that belong to this fault. The list
+        is ordered so that the first element contains the entry with the
+        highest score, so that it should be easy to find the actual score."""
+        def __init__(self, entry):
+            """Construct the fault info with the given log entry as its only
+            one."""
+            self._entries = [entry]
+
+        @property
+        def score(self):
+            """Get the score of this fault, i.e. the score of the entry with
+            the highest score."""
+            return self._entries[0].faultScore if self._entries else 0
+
+        def addEntry(self, entry):
+            """Add an entry to this fault.
+
+            The entries will be sorted."""
+            entries = self._entries
+            entries.append(entry)
+            entries.sort(key = Logger.Entry.faultScore, reverse = True)
+
+        def removeEntry(self, entry):
+            """Remove the given entry.
+
+            Returns True if at least one entry remains, False otherwise."""
+            entries = self._entries
+            for index in range(0, len(entries)):
+                if entry is entries[index]:
+                    del entries[index]
+                    break
+
+            return len(entries)>0
+
     # FIXME: shall we use const.stage2string() instead?
     _stages = { const.STAGE_BOARDING : "Boarding",
@@ -42,12 +165,14 @@
                 const.STAGE_GOAROUND : "Go-Around",
                 const.STAGE_END : "End" }
-    
+
     NO_GO_SCORE = 10000
 
     def __init__(self, output):
         """Construct the logger."""
+        self._entries = {}
         self._lines = []
+
         self._faults = {}
-        self._faultLineIndexes = []
+
         self._output = output
 
@@ -55,11 +180,16 @@
     def lines(self):
         """Get the lines of the log."""
-        return self._lines
+        return [(entry.timestampString, entry.text) for entry in self._lines]
 
     @property
     def faultLineIndexes(self):
-        """Get the array of the indexes of the log line that contains a
-        fault."""
-        return self._faultLineIndexes
+        """Get the sorted array of the indexes of those log lines that contain
+        a fault."""
+        faultLineIndexes = []
+        lines = self._lines
+        for index in range(0, len(lines)):
+            if lines[index].isFault:
+                faultLineIndexes.append(index)
+        return faultLineIndexes
 
     def reset(self):
@@ -67,16 +197,19 @@
 
         The faults logged so far will be cleared."""
+        self._entries = {}
         self._lines = []
-        self._faults.clear()
-        self._faultLineIndexes = []
-                
-    def message(self, timestamp, msg, isFault = False):
-        """Put a simple textual message into the log with the given timestamp."""
-        timeStr = util.getTimestampString(timestamp)
-        return self._logLine(msg, timeStr, isFault = isFault)
-
-    def untimedMessage(self, msg, isFault = False):
+        self._faults = {}
+
+    def message(self, timestamp, msg):
+        """Put a simple textual message into the log with the given timestamp.
+
+        Returns an ID of the message so that it could be referred to later."""
+        return self._addEntry(Logger.Entry(timestamp, msg))
+
+    def untimedMessage(self, msg):
         """Put an untimed message into the log."""
-        return self._logLine(msg, isFault = isFault)
+        timestamp = self._lines[-1].timestamp if self._lines else 0
+        return self._addEntry(Logger.Entry(timestamp, msg,
+                                           showTimestamp = False))
 
     def debug(self, msg):
@@ -97,5 +230,5 @@
                 else const.MESSAGETYPE_INFORMATION
             sendMessage(messageType, "Flight stage: " + s, 3)
-        
+
     def fault(self, faultID, timestamp, what, score):
         """Report a fault.
@@ -104,26 +237,33 @@
         this ID has been reported earlier, it will be reported again only if
         the score is greater than last time. This ID can be, e.g. the checker
-        the report comes from."""
+        the report comes from.
+
+        Returns an ID of the fault, or -1 if it was not logged."""
         if faultID in self._faults:
-            if score<=self._faults[faultID]:
-                return
-        self._faults[faultID] = score
+            if score<=self._faults[faultID].score:
+                return -1
+
         text = "%s (NO GO)" % (what) if score==Logger.NO_GO_SCORE \
                else "%s (%.1f)" % (what, score)
-        lineIndex = self.message(timestamp, text, isFault = True)
-        self._faultLineIndexes.append(lineIndex)
+
+        id = self._addEntry(Logger.Entry(timestamp, text, faultID = faultID,
+                                         faultScore = score))
+
         (messageType, duration) = (const.MESSAGETYPE_NOGO, 10) \
                                   if score==Logger.NO_GO_SCORE \
                                   else (const.MESSAGETYPE_FAULT, 5)
-        sendMessage(messageType, text, duration)            
+        sendMessage(messageType, text, duration)
+
+        return id
 
     def noGo(self, faultID, timestamp, what):
         """Report a No-Go fault."""
-        self.fault(faultID, timestamp, what, Logger.NO_GO_SCORE)
+        return self.fault(faultID, timestamp, what, Logger.NO_GO_SCORE)
 
     def getRating(self):
         """Get the rating of the flight so far."""
         totalScore = 100
-        for (id, score) in self._faults.iteritems():
+        for fault in self._faults.itervalues():
+            score = fault.score
             if score==Logger.NO_GO_SCORE:
                 return -score
@@ -132,16 +272,65 @@
         return totalScore
 
-    def updateLine(self, index, line):
-        """Update the line at the given index with the given string."""
-        (timeStr, _line) = self._lines[index]
-        self._lines[index] = (timeStr, line)
-        self._output.updateFlightLogLine(index, timeStr, line)
-
-    def _logLine(self, line, timeStr = None, isFault = False):
-        """Log the given line."""
-        index = len(self._lines)
-        self._lines.append((timeStr, line))
-        self._output.addFlightLogLine(timeStr, line, isFault)
-        return index
-        
+    def updateLine(self, id, line):
+        """Update the line with the given ID with the given string.
+
+        Note, that it does not change the status of the line as a fault!"""
+        self._updateEntry(id, self._entries[id].copy(text = line))
+
+    def _addEntry(self, entry):
+        """Add the given entry to the log.
+
+        @return the ID of the new entry."""
+        assert entry.id not in self._entries
+
+        self._entries[entry.id] = entry
+
+        if not self._lines or entry>self._lines[-1]:
+            index = len(self._lines)
+            self._lines.append(entry)
+        else:
+            index = bisect.bisect_left(self._lines, entry)
+            self._lines.insert(index, entry)
+
+        if entry.isFault:
+            self._addFault(entry)
+
+        self._output.insertFlightLogLine(index, entry.timestampString,
+                                         entry.text, entry.isFault)
+
+        return entry.id
+
+    def _updateEntry(self, id, newEntry):
+        """Update the entry with the given ID from the given new entry."""
+        self._removeEntry(id)
+        self._addEntry(newEntry)
+
+    def _removeEntry(self, id):
+        """Remove the entry with the given ID."""
+        assert id in self._entries
+
+        entry = self._entries[id]
+        del self._entries[id]
+
+        for index in range(len(self._lines)-1, -1, -1):
+            if self._lines[index] is entry:
+                break
+        del self._lines[index]
+
+        if entry.isFault:
+            faultID = entry.faultID
+            fault = self._faults[faultID]
+            if not fault.removeEntry(entry):
+                del self._faults[faultID]
+
+        self._output.removeFlightLogLine(index)
+
+    def _addFault(self, entry):
+        """Add the given fault entry to the fault with the given ID."""
+        faultID = entry.faultID
+        if faultID in self._faults:
+            self._faults[faultID].addEntry(entry)
+        else:
+            self._faults[faultID] = Logger.Fault(entry)
+
 #--------------------------------------------------------------------------------------
Index: src/mlx/pirep.py
===================================================================
--- src/mlx/pirep.py	(revision 303)
+++ src/mlx/pirep.py	(revision 345)
@@ -54,5 +54,5 @@
             print "Failed loading PIREP from %s: %s" % (path, str(e))
             return None
-        
+
     def __init__(self, flight):
         """Initialize the PIREP from the given flight."""
@@ -64,5 +64,5 @@
         self.cargoWeight = flight.cargoWeight
         self.mailWeight = flight.mailWeight
-        
+
         self.filedCruiseAltitude = flight.filedCruiseAltitude
         self.cruiseAltitude = flight.cruiseAltitude
@@ -86,5 +86,5 @@
         self.flightDefects = flight.flightDefects
         self.delayCodes = flight.delayCodes
-        
+
         self.blockTimeStart = flight.blockTimeStart
         self.flightTimeStart = flight.flightTimeStart
@@ -98,5 +98,5 @@
         self.logLines = logger.lines
         self.faultLineIndexes = logger.faultLineIndexes
-        
+
     def getACARSText(self):
         """Get the ACARS text.
@@ -121,10 +121,10 @@
             if timeStr is not None:
                 text += PIREP._formatLine(timeStr, line)
-                text += "\n"            
+                text += "\n"
 
         text += "\n[Flight Rating: %.1f]" % (max(0.0, self.rating),)
 
         return text
-    
+
     def getTimeComment(self):
         """Get the time comment.
