Saves the log to a text file specified by name. @param fileName the file name @return the name of the file
(String fileName)
| 599 | * @return the name of the file |
| 600 | */ |
| 601 | public String saveLog(String fileName) { |
| 602 | if((fileName==null)||fileName.trim().equals("")) { //$NON-NLS-1$ |
| 603 | return saveLogAs(); |
| 604 | } |
| 605 | try { |
| 606 | BufferedWriter out = new BufferedWriter(new FileWriter(fileName)); |
| 607 | out.write(getText()); |
| 608 | out.flush(); |
| 609 | out.close(); |
| 610 | return fileName; |
| 611 | } catch(IOException ex) { |
| 612 | return null; |
| 613 | } |
| 614 | } |
| 615 | |
| 616 | /** |
| 617 | * Allows getting the text from the logBuffer |