mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +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}
|
||||
except Exception as 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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user