Suppress log messages when simulating FMU from python

2 posts / 0 new
Last post
cleonell
Offline
Joined: 2014-05-22
Suppress log messages when simulating FMU from python

When simulating an FMU created with Dymola (using Dymola solvers) with the PyFMI libray on windows, many messages such as:

    [INFO][Slave] [Log][FMU status:OK]    Minimum integration stepsize  : 2e-006

    [INFO][Slave] [Log][FMU status:OK]    Maximum integration stepsize  : 0.002

    [INFO][Slave] [Log][FMU status:OK]    Maximum integration order     : 3

are output to the console. 

I have tried to use:

    model.set_log_level(0)
    model.set_fmil_log_level(0)
    model.set_debug_logging(False)

Which have no effect.

Even if stdout and stderr are redicrected to NUL from within the calling python script, these messages are still sent to the console.  How can I disable these messages?  Simulating the same FMU with the fmi++ python library does not output these messages which leads me to believe this is something that can be controlled in the PyFMI library.

I'm using PyFMI 2.4 with Python 3.5.3 on Windows 7.  FMU was created with Dymola 2018.  FMI version 1.0, 32 bit for co-simulation using Dymola solvers.

cleonell
Offline
Joined: 2014-05-22
Note,

Note, using:

model.instantiate_slave(logging=False)

Does not have any effect.  It looks like the underlying call to FMIL.fmi1_import_instantiate_slave is not passed the "log" argument.

Login or register to post comments