Make status logging conditional
This commit is contained in:
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}")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user