-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (22 loc) · 993 Bytes
/
main.py
File metadata and controls
31 lines (22 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import logging
from connectors.binance_future import BinanceFutureClient
from interface.rootMain import Root
logger = logging.getLogger()
logger.setLevel(logging.INFO)
stream_headler = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s %(levelname)s :: %(message)s')
stream_headler.setFormatter(formatter)
stream_headler.setLevel(logging.INFO)
file_handler = logging.FileHandler("info.log")
file_handler.setFormatter(formatter)
file_handler.setLevel(logging.DEBUG)
logger.addHandler(stream_headler)
logger.addHandler(file_handler)
# logger.debug("This message is important only when debugging the program")
# logger.info("This message just shows basic information")
# logger.warning("This message is about something you should pay attention to")
# logger.error("This message helps to debug an error that occurred in your program")
if __name__ == '__main__':
binance = BinanceFutureClient('Apikey','SecretApiKey',False)
root = Root(binance)
root.mainloop()