Browse Source

无JIRA任务;去掉调试信息

master
plough 8 years ago
parent
commit
935b4fcca6
  1. 14
      designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java

14
designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java

@ -73,8 +73,6 @@ public class TemplateInfoCollector<T extends IOFile> implements Serializable {
} catch (InvalidClassException ex) {
// 如果 TemplateInfoCollecor 类结构有改动,则放弃之前收集的数据(下次保存时覆盖)
// 这种情况主要在开发、测试过程中遇到,正式上线后不应该出现
FRLogger.getLogger().info(ex.getMessage());
FRLogger.getLogger().info("use a new instance");
instance = new TemplateInfoCollector();
}
catch (Exception ex) {
@ -123,14 +121,6 @@ public class TemplateInfoCollector<T extends IOFile> implements Serializable {
private void saveInfo() {
try {
ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(getInfoFile()));
String log = "";
int count = 1;
for (String key : templateInfoList.keySet()) {
String createTime = ((HashMap)templateInfoList.get(key).get("consumingMap")).get("create_time").toString();
log += (count + ". id: " + key + " " + createTime + "\n" + templateInfoList.get(key).toString() + "\n");
count ++;
}
FRLogger.getLogger().info("writing tplInfo: \n" + log);
os.writeObject(instance);
os.close();
} catch (Exception ex) {
@ -241,10 +231,7 @@ public class TemplateInfoCollector<T extends IOFile> implements Serializable {
String jsonProcessMap = templateInfo.get("jsonProcessMap");
if (sendSingleTemplateInfo(consumingUrl, jsonConsumingMap) && sendSingleTemplateInfo(processUrl, jsonProcessMap)) {
// 清空记录
FRLogger.getLogger().info("successfully send " + templateInfo.get("templateID"));
removeFromTemplateInfoList(templateInfo.get("templateID"));
} else {
FRLogger.getLogger().info("send template info failed, will try next time, " + templateInfo.get("templateID"));
}
}
saveInfo();
@ -303,7 +290,6 @@ public class TemplateInfoCollector<T extends IOFile> implements Serializable {
private void removeFromTemplateInfoList(String key) {
templateInfoList.remove(key);
FRLogger.getLogger().info(key + " is removed...");
}
@SuppressWarnings("unchecked")

Loading…
Cancel
Save