change some logging levels

This commit is contained in:
2026-02-11 16:59:39 +05:30
parent a9564cbbb9
commit 51ed953830
2 changed files with 4 additions and 6 deletions

View File

@@ -48,7 +48,7 @@ class Repository:
def bulk_insert_transactions(self, transactions: List[TransactionRecord]) -> tuple:
"""
Bulk insert transaction records into ach_api_log.
Records with invalid account numbers are silently skipped.
Records with non-ipks account numbers are silently skipped.
Args:
transactions: List of TransactionRecord objects
@@ -60,7 +60,7 @@ class Repository:
logger.warning("No transactions to insert")
return 0, 0
# Validate accounts and filter out invalid ones
# Validate accounts and filter out non-ipks ones
valid_transactions = []
skipped_count = 0
@@ -71,7 +71,7 @@ class Repository:
skipped_count += 1
if not valid_transactions:
logger.info(f"All {skipped_count} transactions skipped (invalid accounts)")
logger.debug(f"All {skipped_count} transactions skipped (non-ipks accounts)")
return 0, skipped_count
conn = self.connector.get_connection()
@@ -96,7 +96,7 @@ class Repository:
conn.commit()
inserted_count = len(valid_transactions)
logger.info(f"Inserted {inserted_count} transactions, skipped {skipped_count} (invalid accounts)")
logger.debug(f"Inserted {inserted_count} transactions, skipped {skipped_count} (non-ipks accounts)")
return inserted_count, skipped_count
except Exception as e:

View File

@@ -74,7 +74,6 @@ class FileProcessor:
# Step 3: Parse file
parser = ACHParser(local_path)
transactions, metadata, summary = parser.parse()
logger.info(f"Parsed {len(transactions)} transactions from {filename}")
if not transactions:
logger.warning(f"No transactions found in {filename}")
@@ -91,7 +90,6 @@ class FileProcessor:
# Step 4: Map transactions
mapped_records = DataMapper.map_transactions(transactions, bankcode)
logger.info(f"Mapped {len(mapped_records)} transactions")
# Step 5: Insert to database (with account validation)
inserted_count, skipped_count = self.repository.bulk_insert_transactions(mapped_records)