forked from LBRYCommunity/lbry-sdk
Merge pull request #266 from lbryio/startup-logging
more logging on startup
This commit is contained in:
commit
0736fa506b
2 changed files with 5 additions and 1 deletions
|
@ -78,8 +78,10 @@ def obfuscate(plain):
|
|||
def check_connection(server="www.lbry.io", port=80):
|
||||
"""Attempts to open a socket to server:port and returns True if successful."""
|
||||
try:
|
||||
log.debug('Checking connection to %s:%s', server, port)
|
||||
host = socket.gethostbyname(server)
|
||||
s = socket.create_connection((host, port), 2)
|
||||
log.debug('Connection successful')
|
||||
return True
|
||||
except Exception as ex:
|
||||
log.info(
|
||||
|
|
|
@ -78,12 +78,14 @@ def start():
|
|||
log.debug('Final Settings: %s', settings.__dict__)
|
||||
|
||||
try:
|
||||
log.debug('Checking for an existing lbrynet daemon instance')
|
||||
JSONRPCProxy.from_url(settings.API_CONNECTION_STRING).is_running()
|
||||
log.info("lbrynet-daemon is already running")
|
||||
if not args.logtoconsole:
|
||||
print "lbrynet-daemon is already running"
|
||||
return
|
||||
except:
|
||||
except Exception:
|
||||
log.debug('No lbrynet instance found, continuing to start')
|
||||
pass
|
||||
|
||||
log.info("Starting lbrynet-daemon from command line")
|
||||
|
|
Loading…
Reference in a new issue