GMLC-TDC / pyhelics

CFFI Python interface for HELICS
https://python.helics.org
BSD 3-Clause "New" or "Revised" License
3 stars 8 forks source link

Logging to a file does not work #63

Open Astarry opened 1 year ago

Astarry commented 1 year ago

Tried h.helicsFederateSetLogFile(fed, helics.log) as well as setting logfile : "helics.log" in the config.json file. How do I get the helics federate to log to a file similar to the helics broker. Using version 3.3.0post0

trevorhardy commented 1 year ago

@Astarry, I almost always run my federations using the HELICS runner and when you do that, all messages do get sent to a log file.

The APIs you referenced, though should work. I just tried running the Fundamental Default example without using the HELICS runner and adding a log_file parameter to the JSON config and it did not write out to that designated file. We've struggled with getting the logging to work correctly across the various language bindings so I'm not surprised this isn't quite working as expected.

(Also, sorry this response is so late. I didn't have Github sending me messages when new issues are posted.)