mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
actions: Log full exception from privileged daemon on error
- This make it easy to find issues when looking at either main service logs or privileged daemon logs. Tests: - Raise an exception in one of the privileged actions. Notice that the exception is printed along with module name, action_name, stdout, stderr and traceback. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
5566f05cad
commit
a43082308d
@ -503,6 +503,11 @@ def _privileged_call(module_name, action_name, arguments):
|
|||||||
return_value = {'result': 'success', 'return': return_values}
|
return_value = {'result': 'success', 'return': return_values}
|
||||||
except Exception as exception:
|
except Exception as exception:
|
||||||
return_value = get_return_value_from_exception(exception)
|
return_value = get_return_value_from_exception(exception)
|
||||||
|
logger.exception(
|
||||||
|
'Error running action: %s..%s(..): %s\nstdout:\n%s\nstderr:\n%s\n',
|
||||||
|
module_name, action_name, exception,
|
||||||
|
return_value['exception']['stdout'],
|
||||||
|
return_value['exception']['stderr'])
|
||||||
|
|
||||||
return return_value
|
return return_value
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user