sort imports
sort imports
implement decorator to log errors

This is convenient to use in command definitions since we have no error
reporting when an error happens while creating plans.
use log_exceptions to guard reboot()
rework logger silencing for tests

Since injecting the logger in a decorator is done at import time,
patching the logger local no longer works (the setUp would run after
import time and thus still patch the logger local but not affect the
decorated function's logger in any way).
pep8 whitespace