Make status logging conditional
parent
4f9b717d31
commit
ab827c0df4
2
toldg.py
2
toldg.py
|
@ -222,6 +222,7 @@ def render_to_file(transactions: List[Transaction], csv_file: str, ledger_file:
|
|||
with open(ledger_file, 'w') as f:
|
||||
f.write(content)
|
||||
status = "update"
|
||||
if status != "no change":
|
||||
logging.info(f"{csv_file:30} -> {ledger_file:30} | {status}")
|
||||
|
||||
|
||||
|
@ -272,6 +273,7 @@ def process_ldg_file(ldg_file: str, config: Config):
|
|||
if file_age(dest_file) > file_age(ldg_file):
|
||||
shutil.copy(ldg_file, dest_file)
|
||||
status = "update"
|
||||
if status != "no change":
|
||||
logging.info(f"{ldg_file:30} -> {dest_file:30} | {status}")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue