Open lucasangarola opened 1 year ago
Thanks for the feedback.
You're right it'd be better if it configured a named logger (see https://stackoverflow.com/questions/35325042/python-logging-disable-logging-from-imported-modules) and used a less verbose default. I'll take a look at that.
In the short term, you should be able to change the default log level by setting an environment variable (see https://github.com/patricksurry/pysimconnect/blob/master/simconnect/sc.py#L21).
e.g. on *nix platforms try export LOGLEVEL=WARNING
and you should get less noise.
Thank you for your answer! I would rather wait for the proper fix. I use logger across my application, hence I don't want to modify the logging level. Looking forward to your fix!
During the process of integrating this great implementation on my simulation software I realized that the SC class will log directly to logging. For those that would like to import the module and use it as-is (my case), it would be great that the exceptions are propagated without logging involved. In this way I would be able to handle and print what is necessary on my software. At the moment, when the Sim is not running, the class will spam my software logging console with unwanted messages.
Suggestion: I would suggest to add a verbose flag as part of the class init, which will enable any logging information. You can make it True by default, but at least I get some control :)
Thank you very much in advance!