Print tracebacks through the logger and only at debug level
merge of '1a849c0fe316e38307b93450f336bd2908237943'
     and '1eaf2b4079e619a4bc429ebef4be2f746e1444d6'
Prefer /dev/urandom