提交 8d52598d 编写于 作者: L luopengting

modify lineage log in parsing

上级 a6805baa
...@@ -105,7 +105,7 @@ class LineageParser: ...@@ -105,7 +105,7 @@ class LineageParser:
except (LineageSummaryAnalyzeException, except (LineageSummaryAnalyzeException,
LineageEventNotExistException, LineageEventNotExistException,
LineageEventFieldNotExistException) as error: LineageEventFieldNotExistException) as error:
logger.debug("Parse file failed, file_path is %s. Detail: %s.", file_path, str(error)) logger.debug("Parse file failed, file_path is %s. Detail: %s", file_path, str(error))
except MindInsightException as error: except MindInsightException as error:
logger.exception(error) logger.exception(error)
logger.debug("Parse file failed, file_path is %s.", file_path) logger.debug("Parse file failed, file_path is %s.", file_path)
......
...@@ -141,7 +141,7 @@ class SummaryAnalyzer: ...@@ -141,7 +141,7 @@ class SummaryAnalyzer:
LineageVerificationException: Raise when verification failed. LineageVerificationException: Raise when verification failed.
""" """
if not crc32.CheckValueAgainstData(crc_str, source_str, len(source_str)): if not crc32.CheckValueAgainstData(crc_str, source_str, len(source_str)):
log.error("The CRC verification failed.") log.debug("The CRC verification not pass. source_str: %s. crc_str: %s.", source_str, crc_str)
raise LineageVerificationException("The CRC verification failed.") raise LineageVerificationException("The CRC verification failed.")
...@@ -201,13 +201,14 @@ class LineageSummaryAnalyzer(SummaryAnalyzer): ...@@ -201,13 +201,14 @@ class LineageSummaryAnalyzer(SummaryAnalyzer):
LineageSummaryAnalyzeException: If failed to get lineage information. LineageSummaryAnalyzeException: If failed to get lineage information.
""" """
analyzer = cls(file_path) analyzer = cls(file_path)
err_msg = "Can not analyze lineage info, file path is %s. Detail: %s"
try: try:
lineage_info = analyzer.get_latest_info() lineage_info = analyzer.get_latest_info()
except (MindInsightException, IOError, DecodeError) as err: except (MindInsightException, IOError, DecodeError) as err:
log.exception(err) log.debug(err_msg, file_path, str(err))
raise LineageSummaryAnalyzeException() raise LineageSummaryAnalyzeException()
except Exception as err: except Exception as err:
log.exception(err) log.debug(err_msg, file_path, str(err))
raise LineageSummaryAnalyzeException() raise LineageSummaryAnalyzeException()
return lineage_info return lineage_info
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册