Browse Source

使用模板打debug日志

final/10.0
alex.sung 6 years ago
parent
commit
88db8fbe54
  1. 7
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ComplementAdviceManager.java
  2. 2
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java
  3. 8
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManeger.java

7
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ComplementAdviceManager.java

@ -30,6 +30,7 @@ public class ComplementAdviceManager {
/** /**
* 从接口中获取补全建议结果 * 从接口中获取补全建议结果
*
* @param searchText * @param searchText
* @return * @return
*/ */
@ -43,9 +44,9 @@ public class ComplementAdviceManager {
try { try {
String result = HttpToolbox.get(url); String result = HttpToolbox.get(url);
AlphaFineHelper.checkCancel(); AlphaFineHelper.checkCancel();
allModelList = AlphaFineHelper.getModelListFromJSONArray(result,"keywords"); allModelList = AlphaFineHelper.getModelListFromJSONArray(result, "keywords");
} catch(Exception e){ } catch (Exception e) {
FineLoggerFactory.getLogger().debug("complement advice search error: " + e.getMessage()); FineLoggerFactory.getLogger().debug("complement advice search error. search str {}", searchText[j]);
} }
} }
if (searchResult.isEmpty()) { if (searchResult.isEmpty()) {

2
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java

@ -75,7 +75,7 @@ public class RecommendSearchManager implements AlphaFineSearchProvider {
} }
} }
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().debug("recommend search get result error! :" + e.getMessage()); FineLoggerFactory.getLogger().debug("recommend search get result error! search str {}", searchText[j]);
} }
} }

8
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManeger.java

@ -24,7 +24,7 @@ public class SimilarSearchManeger implements AlphaFineSearchProvider {
public static SimilarSearchManeger getInstance() { public static SimilarSearchManeger getInstance() {
if (instance == null) { if (instance == null) {
synchronized (SimilarSearchManeger.class){ synchronized (SimilarSearchManeger.class) {
if (instance == null) { if (instance == null) {
instance = new SimilarSearchManeger(); instance = new SimilarSearchManeger();
} }
@ -41,7 +41,7 @@ public class SimilarSearchManeger implements AlphaFineSearchProvider {
return new SearchResult(); return new SearchResult();
} }
SearchResult noConnectList = AlphaFineHelper.getNoConnectList(instance); SearchResult noConnectList = AlphaFineHelper.getNoConnectList(instance);
if(noConnectList != null){ if (noConnectList != null) {
return noConnectList; return noConnectList;
} }
SearchResult allModelList = new SearchResult(); SearchResult allModelList = new SearchResult();
@ -51,9 +51,9 @@ public class SimilarSearchManeger implements AlphaFineSearchProvider {
try { try {
String result = HttpToolbox.get(url); String result = HttpToolbox.get(url);
AlphaFineHelper.checkCancel(); AlphaFineHelper.checkCancel();
allModelList = AlphaFineHelper.getModelListFromJSONArray(result,"title"); allModelList = AlphaFineHelper.getModelListFromJSONArray(result, "title");
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().debug("similar search error: " + e.getMessage()); FineLoggerFactory.getLogger().debug("similar search error.search str {}", searchText[j]);
} }
} }
moreModelList.clear(); moreModelList.clear();

Loading…
Cancel
Save