add logging of built files
This commit is contained in:
parent
065734a628
commit
12aa945a9d
2 changed files with 4 additions and 5 deletions
|
@ -262,6 +262,8 @@ class PyTeXBuilder:
|
||||||
out_dir.mkdir(exist_ok=False, parents=True)
|
out_dir.mkdir(exist_ok=False, parents=True)
|
||||||
new_config: List[Tuple[RelativePath, FormattingConfig]] = \
|
new_config: List[Tuple[RelativePath, FormattingConfig]] = \
|
||||||
source_file.format(self._tmp_dir / source_file.file_hash)
|
source_file.format(self._tmp_dir / source_file.file_hash)
|
||||||
|
for filename in source_file.output_files:
|
||||||
|
logger.info(f"[Built] {filename}")
|
||||||
for output_file in source_file.output_files:
|
for output_file in source_file.output_files:
|
||||||
# TODO: handle this new config file
|
# TODO: handle this new config file
|
||||||
# TODO: handle git stuff / meta info stuff
|
# TODO: handle git stuff / meta info stuff
|
||||||
|
@ -298,12 +300,12 @@ class PyTeXBuilder:
|
||||||
self._load_pytex_files() # 8ms
|
self._load_pytex_files() # 8ms
|
||||||
logger.info(f"Found {len(self._pytex_files)} source files")
|
logger.info(f"Found {len(self._pytex_files)} source files")
|
||||||
self._init_output_files() # 1ms
|
self._init_output_files() # 1ms
|
||||||
logger.info(f"Found {len(self._output_files)} potential files to build.")
|
logger.info(f"Found {len(self._output_files)} potential output files to build.")
|
||||||
self._compute_files_to_build() # 1ms
|
self._compute_files_to_build() # 1ms
|
||||||
if len(self._files_to_build) == 0:
|
if len(self._files_to_build) == 0:
|
||||||
logger.info(f"Everything up to date, nothing to build!")
|
logger.info(f"Everything up to date, nothing to build!")
|
||||||
return True
|
return True
|
||||||
logger.info(f"Needing to build {len(self._files_to_build)} many files.")
|
logger.info(f"Needing to build {len(self._files_to_build)} many source files.")
|
||||||
self._check_output_directory_integrity() # 1ms
|
self._check_output_directory_integrity() # 1ms
|
||||||
logger.info(f"Starting build")
|
logger.info(f"Starting build")
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -89,7 +89,4 @@ class DictFormatter(PyTeXFormatter):
|
||||||
output_file.write_text(
|
output_file.write_text(
|
||||||
''.join(lines)
|
''.join(lines)
|
||||||
)
|
)
|
||||||
logger.info(
|
|
||||||
f'Successfully wrote dictionary file {output_file.name}.'
|
|
||||||
)
|
|
||||||
return [] # No future configuration needed
|
return [] # No future configuration needed
|
||||||
|
|
Loading…
Reference in a new issue