PicoQuant / snAPI

snAPI is a Python wrapper which enables seamless communication and configuration with PicoQuant TCSPC devices.
https://picoquant.github.io/snAPI/
Other
24 stars 4 forks source link

Option to suppress snAPI64.dll/initAPI -> "loadSettingsIni: <path_to_ini>" console output #8

Closed ChrisOKay closed 10 months ago

ChrisOKay commented 11 months ago

Is your feature request related to a problem? Please describe. This request is not related to a problem. We are trying to keep our console output as minimal as possible. However, during initialization of snAPI, the dll call of snAPI64.dll => initAPI leads to a seemingly unpreventable output of the used path ("loadSettingsIni: ")

Describe the solution you'd like I would like to have an option to suppress this message during the initAPI call. Ideally, it should be "auto-prevented" when setting [LogLevel] => API = 0. (I acknowledge that this could lead to a chicken-and-egg problem)

Describe alternatives you've considered All [Log] and [LogLevel] within the system.ini are already disabled, which does not prevent the "loadSettingsIni" output. I have tried to suppress this output via

with contextlib.redirect_stdout(None):
    sn = snAPI(libType=LibType.MH)

but the output still appears in the console.

tpoint75 commented 10 months ago

No problem, i moved that to the API log level. I found some more uncategorized log entries and fixed them.. Thank you for reporting!

tpoint75 commented 10 months ago

I think will make an new release this week!