Index: trunk/src/tmcsim/cadsimulator/Coordinator.java
===================================================================
--- trunk/src/tmcsim/cadsimulator/Coordinator.java	(revision 432)
+++ trunk/src/tmcsim/cadsimulator/Coordinator.java	(revision 435)
@@ -100,4 +100,8 @@
     private String kSimClockFilename;
     /**
+     * Name of output file for CAD comments 
+     */
+    private static final String LOG_FILE_NAME = "CADcomments.log";
+    /**
      * Error logger.
      */
@@ -714,23 +718,7 @@
 
                     CADServer.theIncidentMgr.tick(currentSimTime);
-                    /* Write the currentSimTime to a file. 
-                       This will be read asynchronously by web clients, e.g.,
-                       the electronic instructor notebook, that want to display
-                       the current simulation time.
-                    */
-                    PrintWriter writer = null;
-                    try {
-                        writer = new PrintWriter(new FileWriter(kSimClockFilename));
-                        // Format output as json
-                        String lineout =  "{\"elapsedtime\":\"" 
-                                + currentSimTime + "\"}";
-                        writer.println(lineout);
-                        writer.close();
-                        } catch (Exception ex) 
-                        {
-                        coorLogger.logp(Level.SEVERE, "Coordinator", "tick:run",
-                                "Failed to write current sim time to file.", ex);
-                        } 
-                        }
+                    writeCADlog();
+                    writeSimTime(currentSimTime);
+                }
             };
 
@@ -739,5 +727,75 @@
         }
     }
-
+    /** Helper method to write the current CAD comment log to a file.  
+     *  Invoked from tick() method.  Note: This writes all comments each time it's
+     * invoked.  It doesn't have any intelligence to selectively write only the
+     * most recently updated comments.
+     * @author jdalbey   July 2019
+     */
+    private void writeCADlog()
+    {
+        // Obtain the current incident list
+        Vector<Incident> incList = null; 
+        try {
+            incList = getIncidentList();
+        } catch (RemoteException ex) {
+            Logger.getLogger(Coordinator.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        // Initialize an output buffer
+        StringBuffer output = new StringBuffer();
+        // Process all the incidents
+        for (Incident incident: incList)
+        {
+            // Retrieve the table of comments/notes the users created
+            DefaultTableModel notesTable = incident.getCommentsNotesTable();
+            // Retrieve the notes chronologically (Most recent is in first row)
+            for (int row=notesTable.getRowCount()-1; row >=0; row--)
+            {
+                // Combine the fields into one output entry
+                String initials = (String) notesTable.getValueAt(row,2); // user initials
+                // If there are user intials, include this item.
+                // Zero length initials mean it's a scripted item, ignore it.
+                if (initials.length() > 0)
+                {//CAD Log Entry, Incident #187, Sharon: REQUEST EXTRA ANCHOVIES
+                    output.append("CAD log entry, ");
+                    output.append("Incident #" + incident.logNum + ", ");
+                    output.append(initials + ": ");
+                    output.append(notesTable.getValueAt(row,4) + "\n"); // notes
+                }
+            }
+        }
+        // Write output buffer to a file
+        try 
+        {
+            PrintWriter writer = new PrintWriter(new FileWriter(LOG_FILE_NAME));
+            writer.print(output);
+            writer.close();
+        } catch (Exception exc) 
+        {
+            exc.printStackTrace();
+        } 
+    }
+    
+    /** Write the currentSimTime to a file. 
+       This will be read asynchronously by web clients, e.g.,
+       the electronic instructor notebook, that want to display
+       the current simulation time.
+    */
+    private void writeSimTime(long currentSimTime)
+    {
+        PrintWriter writer = null;
+        try {
+            writer = new PrintWriter(new FileWriter(kSimClockFilename));
+            // Format output as json
+            String lineout =  "{\"elapsedtime\":\"" 
+                    + currentSimTime + "\"}";
+            writer.println(lineout);
+            writer.close();
+            } catch (Exception ex) 
+            {
+            coorLogger.logp(Level.SEVERE, "Coordinator", "tick:run",
+                    "Failed to write current sim time to file.", ex);
+            } 
+    }
     /**
      * Method notifies observers with an IncidentSummaryModel_obj to signify
