Skip to content

improve logging by adding log context (workflow name, actor name)

Wout De Nolf requested to merge logging_format into main

I was trying to debug pypushflow but the logging was very confusing. I tried to clean it up by adding log context.

This is the logging of the triggering and execution of one python actor:

DEBUG    pypushflow:ThreadCounter.py:49 [submodel] Thread started for 'in' (2 threads running)
INFO     pypushflow:PythonActor.py:114 [submodel] [<EwoksPythonActor> in] triggered with inData =
 {'_noinput': {'node_attrs': {'task_identifier': 'ewoksppf.tests.test_ppf_workflow21.passthrough',
                             'task_type': 'method'},
              'node_id': 'in',
              'varinfo': {'root_uri': '/tmp/pytest-of-denolf/pytest-87/test_workflow21_True_True_args0'}},
 'a': 20}
INFO     pypushflow:AbstractActor.py:78 [submodel] [<EwoksPythonActor> in] started
DEBUG    pypushflow:PythonActor.py:81 [submodel] [<EwoksPythonActor> in] asynchronous execution of 'ewoksppf.ppfrunscript.run' 
DEBUG    pypushflow:ThreadCounter.py:49 [submodel] Thread ended for 'Start' (1 threads running)
DEBUG    pypushflow:StopActor.py:49 [submodel] [<StopActor> Stop] wait for scheduler threads to be finished
INFO     pypushflow:AbstractActor.py:85 [submodel] [<EwoksPythonActor> in] finished
Edited by Wout De Nolf

Merge request reports