Changeset 32757

Show
Ignore:
Timestamp:
07.02.2019 21:32:29 (3 months ago)
Author:
ak19
Message:

Minor improvements to code and correction to mysql.properties file path

Location:
other-projects/the-macronizer/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • other-projects/the-macronizer/trunk/build.xml

    r32755 r32757  
    140140            source ${scripts.dir}/MySQL_Code.sql 
    141141       
    142       3. Edit ${build.dir.exp}/WEB-INF/classes/mysql.properties to set the db password. 
     142      3. Edit ${basedir}/mysql.properties to set the db password. 
    143143        - If you set up a different username for the mysql db, set that in mysql.properties too. 
    144144        - If nothing is set, MacronLogFileProcessor will assume the username is root.    
  • other-projects/the-macronizer/trunk/src/java/util/MacroniserLogFileProcessor.java

    r32749 r32757  
    1313//import MySQLAccess.Tuple; 
    1414 
    15  
    1615public class MacroniserLogFileProcessor { 
    1716    static boolean debug = false; 
     17     
    1818    /** ARGUMENTS: 
    1919     *              /home/wjkw1/RESEARCH_2018-19/bash_test/loggingtest.log 
     
    2121     */ 
    2222 
    23     static final String directInputRegexp = "INFO : \\[\\d\\d\\d\\d\\-\\d\\d\\-\\d\\d \\d\\d:\\d\\d:\\d\\d\\] DirectInput.doPost\\(\\)"; 
    24     static final String fileUploadRegexp = "ERROR: \\[\\d\\d\\d\\d\\-\\d\\d\\-\\d\\d \\d\\d:\\d\\d:\\d\\d\\] FileUpload.doPost\\(\\)"; 
     23    static final String directInputRegexp = "INFO : \\[\\d\\d\\d\\d\\-\\d\\d\\-\\d\\d \\d\\d:\\d\\d:\\d\\d\\] DirectInput.doPost\\(\\)\\s*"; 
     24    static final String fileUploadRegexp = "ERROR: \\[\\d\\d\\d\\d\\-\\d\\d\\-\\d\\d \\d\\d:\\d\\d:\\d\\d\\] FileUpload.doPost\\(\\)\\s*"; 
    2525 
    2626    static ArrayList<MacroniserLogFileData> extractedEntries; 
     
    3333 
    3434 
    35         if(debug) { 
     35        if(debug) {      
    3636            int count = 0; 
    3737            for (MacroniserLogFileData entry : extractedEntries) { 
     
    130130    private static void extractFromLogFile(String filename) { 
    131131 
     132    ///System.out.println("** In extractFromLogFile: " + filename); 
     133     
    132134        BufferedReader br = null; 
    133135        try { 
     
    140142 
    141143            while ((line = br.readLine())!= null){ 
     144        ///System.out.println("@@@ Read line: " + line); 
     145         
    142146                if(!firstTagFound){ 
    143147                    //check for tag 
     
    145149                    //add to list if the first match 
    146150                    if(firstTagFound) { 
     151            ///System.out.println("Found first tag: " + line); 
    147152                        extractedSB.append(line); 
    148153                        continue; 
     
    152157                    if(doesLineMatch(line)){ 
    153158                        //turn the string builder text into MacroniserLogFileData object 
     159            ///System.out.println("LINE MATCHED: " + line); 
     160             
    154161                        MacroniserLogFileData entry = transformLogFileStringToObject(extractedSB.toString()); 
    155162                        //perform operations if not null, else error