mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-16 11:09:13 +00:00
Adjust logging for tests
This commit is contained in:
@@ -21,17 +21,21 @@ try:
|
||||
# -----------------------------------
|
||||
APP_DIR = Path.home() / ".seedpass"
|
||||
APP_DIR.mkdir(exist_ok=True, parents=True) # Ensure the directory exists
|
||||
logging.info(f"Application directory created at {APP_DIR}")
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.info(f"Application directory created at {APP_DIR}")
|
||||
except Exception as e:
|
||||
logging.error(f"Failed to create application directory: {e}")
|
||||
logging.error(traceback.format_exc()) # Log full traceback
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.error(f"Failed to create application directory: {e}")
|
||||
logger.error(traceback.format_exc()) # Log full traceback
|
||||
|
||||
try:
|
||||
PARENT_SEED_FILE = APP_DIR / "parent_seed.enc" # Encrypted parent seed
|
||||
logging.info(f"Parent seed file path set to {PARENT_SEED_FILE}")
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.info(f"Parent seed file path set to {PARENT_SEED_FILE}")
|
||||
except Exception as e:
|
||||
logging.error(f"Error setting file paths: {e}")
|
||||
logging.error(traceback.format_exc()) # Log full traceback
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.error(f"Error setting file paths: {e}")
|
||||
logger.error(traceback.format_exc()) # Log full traceback
|
||||
|
||||
# -----------------------------------
|
||||
# Checksum Files for Integrity
|
||||
@@ -40,10 +44,12 @@ try:
|
||||
SCRIPT_CHECKSUM_FILE = (
|
||||
APP_DIR / "seedpass_script_checksum.txt"
|
||||
) # Checksum for main script
|
||||
logging.info(f"Checksum file path set: Script {SCRIPT_CHECKSUM_FILE}")
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.info(f"Checksum file path set: Script {SCRIPT_CHECKSUM_FILE}")
|
||||
except Exception as e:
|
||||
logging.error(f"Error setting checksum file paths: {e}")
|
||||
logging.error(traceback.format_exc()) # Log full traceback
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.error(f"Error setting checksum file paths: {e}")
|
||||
logger.error(traceback.format_exc()) # Log full traceback
|
||||
|
||||
# -----------------------------------
|
||||
# Password Generation Constants
|
||||
|
Reference in New Issue
Block a user