mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Added Logger class; refactored logging accordingly
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
from sys import argv
|
||||
from getopt import getopt
|
||||
|
||||
from pisa import logging, M
|
||||
from pisa import logging, Logger
|
||||
from pisa.api import start_api
|
||||
from pisa.tools import can_connect_to_bitcoind, in_correct_network
|
||||
|
||||
logger = Logger("Pisad")
|
||||
|
||||
if __name__ == '__main__':
|
||||
debug = False
|
||||
@@ -19,8 +20,8 @@ if __name__ == '__main__':
|
||||
start_api()
|
||||
|
||||
else:
|
||||
logging.error(M("[Pisad] bitcoind is running on a different network, check conf.py and bitcoin.conf. "
|
||||
"Shutting down"))
|
||||
logger.error("[Pisad] bitcoind is running on a different network, check conf.py and bitcoin.conf. "
|
||||
"Shutting down")
|
||||
|
||||
else:
|
||||
logging.error(M("[Pisad] can't connect to bitcoind. Shutting down"))
|
||||
logging.error("[Pisad] can't connect to bitcoind. Shutting down")
|
||||
|
||||
Reference in New Issue
Block a user