Logs appear twice for every message after you added a handler.
IntermediateTroubleshootingRuntime, file, subprocess & encoding errors
Answer
Likely causes → A handler was added to your named logger and the root logger also has one, so records propagate and are emitted twice; or basicConfig/addHandler runs on every function call or import.
Diagnose →
print(logging.getLogger("cloudaudit").handlers, logging.getLogger().handlers)
Fix → Configure handlers once, on the root logger only, in the entry point; or set propagate = False on the logger that has its own handler.
Prevent → Modules only call getLogger(__name__); only main() configures.
More on Runtime, file, subprocess & encoding errors
`KeyError: 'Tags'` while processing `describe_instances` output.Beginner`TypeError: can't compare offset-naive and offset-aware datetimes` in a snapshot-age check.Beginner`UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte` reading a log file.Intermediate`UnicodeEncodeError: 'ascii' codec can't encode character '✓'` when printing in a container.Intermediate`PermissionError: [Errno 13] Permission denied: '/var/log/app/report.json'`Intermediate`OSError: [Errno 24] Too many open files` in a long-running Python service.Intermediate