Browse Source

Removed excessive debug log

develop
LO Kam Tao Leo 4 years ago
parent
commit
17e064ebcf
  1. 9
      src/org/leolo/rail/ScheduleProcessor.java

9
src/org/leolo/rail/ScheduleProcessor.java

@ -124,8 +124,8 @@ public class ScheduleProcessor extends BaseProcessor implements Runnable {
pstmt.setString(1, ts.getSUID()); pstmt.setString(1, ts.getSUID());
try(ResultSet rs = pstmt.executeQuery()){ try(ResultSet rs = pstmt.executeQuery()){
if(rs.next()) { if(rs.next()) {
log.atDebug().log("SUID: {}, old hash: {}, new hash: {}", ts.getSUID(), Integer.toHexString(rs.getInt(1)), Integer.toHexString(ts.hashCode())); // log.atDebug().log("SUID: {}, old hash: {}, new hash: {}", ts.getSUID(), Integer.toHexString(rs.getInt(1)), Integer.toHexString(ts.hashCode()));
System.exit(1000); // System.exit(1000);
if(rs.getInt(1)!=ts.hashCode()) { if(rs.getInt(1)!=ts.hashCode()) {
updatedSchedule.add(ts); updatedSchedule.add(ts);
} }
@ -276,15 +276,16 @@ public class ScheduleProcessor extends BaseProcessor implements Runnable {
psLoc.executeBatch(); psLoc.executeBatch();
conn.commit(); conn.commit();
} }
}//New Records }//Updated Records
log.atInfo().log("Inserted new {} record(s).",newSchedule.size()); // log.atInfo().log("Inserted new {} record(s).",newSchedule.size());
} catch (SQLException e) { } catch (SQLException e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
if(!targetFile.delete()) { if(!targetFile.delete()) {
log.warn("Unable to delete {}", targetFile.getName()); log.warn("Unable to delete {}", targetFile.getName());
} }
log.atInfo().log("Done processing {}", targetFile.getName());
} }
private long getScheduleTime(String t) { private long getScheduleTime(String t) {

Loading…
Cancel
Save