From 3b34bddf0a00a716ba0608c9890bd482088f1492 Mon Sep 17 00:00:00 2001 From: Job Evers-Meltzer Date: Fri, 11 Nov 2016 10:10:00 -0600 Subject: [PATCH] more logging on startup --- lbrynet/core/utils.py | 2 ++ lbrynet/lbrynet_daemon/DaemonControl.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lbrynet/core/utils.py b/lbrynet/core/utils.py index 9bd5935d4..598d6d793 100644 --- a/lbrynet/core/utils.py +++ b/lbrynet/core/utils.py @@ -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( diff --git a/lbrynet/lbrynet_daemon/DaemonControl.py b/lbrynet/lbrynet_daemon/DaemonControl.py index f16728fa4..abf18bb5f 100644 --- a/lbrynet/lbrynet_daemon/DaemonControl.py +++ b/lbrynet/lbrynet_daemon/DaemonControl.py @@ -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")