autopilot icon indicating copy to clipboard operation
autopilot copied to clipboard

Catch stdout in logs

Open sneakers-the-rat opened this issue 4 years ago • 1 comments

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.

sneakers-the-rat avatar Jan 21 '21 01:01 sneakers-the-rat

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

sneakers-the-rat avatar Jan 21 '21 02:01 sneakers-the-rat