pysimconnect icon indicating copy to clipboard operation
pysimconnect copied to clipboard

SimConnect class produces unwanted verbose output

Open lucasangarola opened this issue 11 months ago • 2 comments

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 :)

class SimConnect:
    def __init__(
            self,
            name='pySimConnect',
            dll_path=_dll_path,
            default_receivers=_default_receivers,
            poll_interval_seconds=0.05,
            verbose: bool = True):

Thank you very much in advance!

lucasangarola avatar Jul 30 '23 13:07 lucasangarola