mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 13:47:09 +00:00
(improvement)(headless)Change several info-mode logs to debug-mode
This commit is contained in:
@@ -37,7 +37,7 @@ public abstract class BaseSemanticCorrector implements SemanticCorrector {
|
||||
return;
|
||||
}
|
||||
doCorrect(queryContext, semanticParseInfo);
|
||||
log.info("sqlCorrection:{} sql:{}", this.getClass().getSimpleName(), semanticParseInfo.getSqlInfo());
|
||||
log.debug("sqlCorrection:{} sql:{}", this.getClass().getSimpleName(), semanticParseInfo.getSqlInfo());
|
||||
} catch (Exception e) {
|
||||
log.error(String.format("correct error,sqlInfo:%s", semanticParseInfo.getSqlInfo()), e);
|
||||
}
|
||||
|
||||
@@ -168,12 +168,12 @@ public class HanlpHelper {
|
||||
}
|
||||
|
||||
public static boolean addToCustomDictionary(DictWord dictWord) {
|
||||
log.info("dictWord:{}", dictWord);
|
||||
log.debug("dictWord:{}", dictWord);
|
||||
return getDynamicCustomDictionary().insert(dictWord.getWord(), dictWord.getNatureWithFrequency());
|
||||
}
|
||||
|
||||
public static void removeFromCustomDictionary(DictWord dictWord) {
|
||||
log.info("dictWord:{}", dictWord);
|
||||
log.debug("dictWord:{}", dictWord);
|
||||
CoreDictionary.Attribute attribute = getDynamicCustomDictionary().get(dictWord.getWord());
|
||||
if (attribute == null) {
|
||||
return;
|
||||
|
||||
@@ -89,7 +89,7 @@ public class HanlpDictMatchStrategy extends BaseMatchStrategy<HanlpMapResult> {
|
||||
.filter(term -> CollectionUtils.isNotEmpty(term.getNatures()))
|
||||
.collect(Collectors.toCollection(LinkedHashSet::new));
|
||||
|
||||
log.info("detectSegment:{},after isSimilarity parseResults:{}", detectSegment, hanlpMapResults);
|
||||
log.debug("detectSegment:{},after isSimilarity parseResults:{}", detectSegment, hanlpMapResults);
|
||||
|
||||
hanlpMapResults = hanlpMapResults.stream().map(parseResult -> {
|
||||
parseResult.setOffset(offset);
|
||||
|
||||
@@ -35,14 +35,14 @@ public class DefaultQueryParser implements QueryParser {
|
||||
if (Objects.isNull(queryStatement.getMetricQueryParam())) {
|
||||
queryStatement.setMetricQueryParam(new MetricQueryParam());
|
||||
}
|
||||
log.info("SemanticConverter before [{}]", queryParam);
|
||||
log.debug("SemanticConverter before [{}]", queryParam);
|
||||
for (HeadlessConverter headlessConverter : ComponentFactory.getSemanticConverters()) {
|
||||
if (headlessConverter.accept(queryStatement)) {
|
||||
log.info("SemanticConverter accept [{}]", headlessConverter.getClass().getName());
|
||||
headlessConverter.convert(queryStatement);
|
||||
}
|
||||
}
|
||||
log.info("SemanticConverter after {} {} {}", queryParam, queryStatement.getDataSetQueryParam(),
|
||||
log.debug("SemanticConverter after {} {} {}", queryParam, queryStatement.getDataSetQueryParam(),
|
||||
queryStatement.getMetricQueryParam());
|
||||
if (!queryStatement.getDataSetQueryParam().getSql().isEmpty()) {
|
||||
queryStatement = parser(queryStatement.getDataSetQueryParam(), queryStatement);
|
||||
|
||||
Reference in New Issue
Block a user