devcartel / pyrfa

Open sourced Python API for Refinitiv (Thomson Reuters) Enterprise Platform.
http://devcartel.com/pyrfa
MIT License
52 stars 16 forks source link

Errors on screen - how to disable all messages? #30

Closed ghost closed 5 years ago

ghost commented 7 years ago

Hi,

We've started using PyRFA to pull some prices and set self.p.setDebugMode(False) yet we still have errors spamming the console when running. Is there a way to silence them (no log needed)?

Thanks, -Chay


   [Fri Aug 25 15:36:21 2017]: (ComponentName) Pyrfa: (Severity) Error:
        Status :
        dataState="Suspect"
        streamState="Closed"
        statusCode="Unknown RespCode"
        statusText=""

   Process completed successfully with xxxx results.
wiwat-tharateeraparb commented 7 years ago

If you setDebugMode(False) before receiving the status (e.g. at the time of your market data subscription) then you should not have this message printed out on console. To make sure that you have turned off debug mode at the start of your application, you can set a configuration in pyrfa.cfg:

\pyrfa\debug = false

Then logs will only be populated in a log file and not on screen.

ghost commented 7 years ago

Thanks, set that and the console was silent.