Closed aleangelin88 closed 2 years ago
Sure! Just add this to the top of your file:
import logging
logging.basicConfig(level=logging.DEBUG,
filename=os.path.basename(__file__) + '.log',
format="{asctime} [{levelname:8}] {process} {thread} {module}: {message}",
style="{")
Feel free to reopen if needed....
Is it possible to re-direct the messages like the one shown below to a file or to a normal logging stream? Thank you
INFO:root:BinanceWebSocketApiSocket.start_socket(9e050e79-3d4b-452e-8e2d-31fd5826b736) - Received result message: {"result":null,"id":1} INFO:root:BinanceWebSocketApiManager._frequent_checks() - reached new
highest_receiving_speed
8.66 kB/s at 2021-07-23, 12:36:02 UTC INFO:root:BinanceWebSocketApiManager._frequent_checks() - reached newhighest_receiving_speed
11.21 kB/s at 2021-07-23, 12:36:03 UTC INFO:root:BinanceWebSocketApiManager._frequent_checks() - reached newhighest_receiving_speed
14.41 kB/s at 2021-07-23, 12:36:04 UTC INFO:root:BinanceWebSocketApiManager._frequent_checks() - reached newhighest_receiving_speed
16.06 kB/s at 2021-07-23, 12:36:05 UTC