In docs/source/examples/python/reaction.py add a logging statement in the reuse loop with a %s placeholder, for example logging.warning("Reusing %s instance", "reaction")
Run the examples (make test_examples)
Check output of run_reaction_diffusion_python_<date>_<time>:
instances/micro/stderr.txt displays Reusing reaction instance, as expected
muscle3_manager.log displays Reusing %s instance
Expected behaviour:
The muscle manager logs should also show the formatted message.
Reproduction:
docs/source/examples/python/reaction.py
add a logging statement in the reuse loop with a%s
placeholder, for examplelogging.warning("Reusing %s instance", "reaction")
make test_examples
)run_reaction_diffusion_python_<date>_<time>
:instances/micro/stderr.txt
displaysReusing reaction instance
, as expectedmuscle3_manager.log
displaysReusing %s instance
Expected behaviour:
The muscle manager logs should also show the formatted message.
To fix:
Format the message in
MuscleManagerHandler
before creating the LogMessage. See for example the python StreamHandler.emit implementation here.