diff --git a/proxywatchd.py b/proxywatchd.py index 75b2e5f..1cf6cc2 100644 --- a/proxywatchd.py +++ b/proxywatchd.py @@ -3,6 +3,7 @@ import threading import time, random, string, re, copy import requests +import sys #from geoip import geolite2 import config @@ -128,12 +129,13 @@ class WorkerThread(): if self.done.is_set(): break time.sleep(0.01) if self.thread: - _log("thread terminated", self.id) + sys.stdout.write('%s/%s\tthread terminated\r' % (time.strftime('%H:%M:%S', time.gmtime()), self.id)) + sys.stdout.flush() class Proxywatchd(): def stop(self): - _log('Requesting proxywatchd to halt (%d thread(s))' % len([item for item in self.threads if True])) + _log('\rRequesting proxywatchd to halt (%d thread(s))' % len([item for item in self.threads if True])) self.stopping.set() def _cleanup(self):