I'm an SRE, so my programs are generally Python scripts < 1K LOC; maybe this isn't scalable, but I write verbose log statements (if it's launched with --verbose, of course). It's not that much effort to change `except OSError as e: log.error(e)` to `except OSError as e: log.error(f"Error accessing {file} - {e}")`
If I know typical causes of errors (forgot to connect to the VPN, etc.), I'll include them in the log message as well as things to check.
If I know typical causes of errors (forgot to connect to the VPN, etc.), I'll include them in the log message as well as things to check.