mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 05:43:51 +00:00
(improvement)(headless)Opt logging messages to make it cleaner.
This commit is contained in:
@@ -137,7 +137,7 @@ public class SearchService {
|
||||
}
|
||||
|
||||
public static void clear() {
|
||||
log.info("clear all trie");
|
||||
log.debug("clear all trie");
|
||||
trie = new BinTrie<>();
|
||||
suffixTrie = new BinTrie<>();
|
||||
}
|
||||
|
||||
@@ -86,8 +86,6 @@ public class HanlpHelper {
|
||||
*/
|
||||
public static boolean reloadCustomDictionary() throws IOException {
|
||||
|
||||
log.info("reloadCustomDictionary start");
|
||||
|
||||
final long startTime = System.currentTimeMillis();
|
||||
|
||||
if (HanLP.Config.CustomDictionaryPath == null || HanLP.Config.CustomDictionaryPath.length == 0) {
|
||||
@@ -106,7 +104,10 @@ public class HanlpHelper {
|
||||
SearchService.clear();
|
||||
|
||||
boolean reload = getDynamicCustomDictionary().reload();
|
||||
log.info("reloadCustomDictionary end ,cost:{},reload:{}", System.currentTimeMillis() - startTime, reload);
|
||||
if (reload) {
|
||||
log.info("Custom dictionary has been reloaded in {} milliseconds",
|
||||
System.currentTimeMillis() - startTime);
|
||||
}
|
||||
return reload;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class LLMSqlParser implements SemanticParser {
|
||||
if (dataSetId == null) {
|
||||
return;
|
||||
}
|
||||
log.info("Generate query statement for dataSetId:{}", dataSetId);
|
||||
log.info("Try generating query statement for dataSetId:{}", dataSetId);
|
||||
|
||||
//3.invoke LLM service to do parsing.
|
||||
tryParse(queryCtx, dataSetId);
|
||||
@@ -51,11 +51,11 @@ public class LLMSqlParser implements SemanticParser {
|
||||
|
||||
LLMReq llmReq = requestService.getLlmReq(queryCtx, dataSetId);
|
||||
|
||||
int currentRetry = 0;
|
||||
int currentRetry = 1;
|
||||
Map<String, LLMSqlResp> sqlRespMap = new HashMap<>();
|
||||
ParseResult parseResult = null;
|
||||
while (currentRetry < maxRetries) {
|
||||
log.info("currentRetry:{},start runText2SQL", currentRetry);
|
||||
while (currentRetry <= maxRetries) {
|
||||
log.info("currentRetryRound:{}, start runText2SQL", currentRetry);
|
||||
try {
|
||||
LLMResp llmResp = requestService.runText2SQL(llmReq);
|
||||
if (Objects.nonNull(llmResp)) {
|
||||
@@ -68,7 +68,7 @@ public class LLMSqlParser implements SemanticParser {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("currentRetry:{},runText2SQL error", currentRetry, e);
|
||||
log.error("currentRetryRound:{}, runText2SQL failed", currentRetry, e);
|
||||
}
|
||||
currentRetry++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user