autopilot
autopilot copied to clipboard
Catch stdout in logs
Logging is coming along, but it's still the case that just raise Exception
doesn't get caught in the logs. Need to catch stdout/stderr so unhandled exceptions are documented, especially when running as a systemd daemon which needs journalctl -u autopilot -e
or something not entirely obvious to access.
smth as simple as this would work, initialized whenever the first logger gets inited with init_logger
: https://intellipaat.com/community/8777/making-python-loggers-output-all-messages-to-stdout-in-addition-to-log-file?show=8842#a8842