Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 170263 | Differences between
and this patch

Collapse All | Expand All

(-)src.import/org/eclipse/hyades/logging/parsers/importer/ParserWrapper.java (-1 / +13 lines)
Lines 737-751 Link Here
737
		String tempWindowsFile = "windows.txt";
737
		String tempWindowsFile = "windows.txt";
738
		String newConverter = converter;
738
		String newConverter = converter;
739
		
739
		
740
		
741
		
742
	
740
        // If this is the Windows application/security/system event log parser then create the converter command
743
        // If this is the Windows application/security/system event log parser then create the converter command
741
        /* Use the config file directory and converter command (bugzilla 145830) to determine if this is a Windows 
744
        /* Use the config file directory and converter command (bugzilla 145830) to determine if this is a Windows 
742
		 * application/security/system event log parser.
745
		 * application/security/system event log parser.
743
		 */
746
		 */
744
		int winIndex = configFileDirectory.lastIndexOf("Windows\\");
747
		int winIndex = configFileDirectory.lastIndexOf("Windows\\");
748
		
745
		int evtTypeIndex = winIndex+8;   /* Index of the type of event log located immediately after "Windows\" in the config path */
749
		int evtTypeIndex = winIndex+8;   /* Index of the type of event log located immediately after "Windows\" in the config path */
746
		
750
		
747
        if (winIndex != -1 && ((configFileDirectory.substring(evtTypeIndex).indexOf("application") == 0) || (configFileDirectory.substring(evtTypeIndex).indexOf("security") == 0) || (configFileDirectory.substring(evtTypeIndex).indexOf("system") == 0))
751
        if (winIndex != -1 && ((configFileDirectory.substring(evtTypeIndex).indexOf("application") == 0) || (configFileDirectory.substring(evtTypeIndex).indexOf("security") == 0) || (configFileDirectory.substring(evtTypeIndex).indexOf("system") == 0))
748
        		&& converter.indexOf("eventlogreader.exe") != -1) {
752
        		&&( converter.indexOf("eventlogreader.exe") != -1|| converter.indexOf("EventLogReader2.exe") != -1)) {
749
753
750
            // Create a temporary file to hold the output of the converter.
754
            // Create a temporary file to hold the output of the converter.
751
            File tempFile;
755
            File tempFile;
Lines 796-802 Link Here
796
            	
800
            	
797
            
801
            
798
            // Create the new converter command		
802
            // Create the new converter command		
803
            
804
            if(converter.indexOf("EventLogReader2.exe") != -1)
805
            {
806
            	  newConverter = "\"".concat(baseFileDirectory).concat(ParserConstants.FILE_SEPARATOR).concat("eventlogreader2.exe\" \"").concat(windowsEventLog).concat("\" \"").concat(tempFile.getAbsolutePath()).concat("\"");
807
            }
808
            else
809
            {
799
            newConverter = "\"".concat(baseFileDirectory).concat(ParserConstants.FILE_SEPARATOR).concat("eventlogreader.exe\" \"").concat(windowsEventLog).concat("\" \"").concat(tempFile.getAbsolutePath()).concat("\"");
810
            newConverter = "\"".concat(baseFileDirectory).concat(ParserConstants.FILE_SEPARATOR).concat("eventlogreader.exe\" \"").concat(windowsEventLog).concat("\" \"").concat(tempFile.getAbsolutePath()).concat("\"");
811
            }
800
812
801
            // set the new file to parse the text file that will be the output of the converter command
813
            // set the new file to parse the text file that will be the output of the converter command
802
            newFileName = tempFile.getName();
814
            newFileName = tempFile.getName();

Return to bug 170263