From 2034941d646546360ba7a58a8764533416e9292b Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Tue, 5 Dec 2017 10:32:12 +0100 Subject: [PATCH] Append to log instead of replacing --- helpers/contributor_helper.py | 2 +- helpers/geo_helper.py | 2 +- helpers/trendings_helper.py | 2 +- helpers/users_helper.py | 2 +- zmq_dispatcher.py | 2 +- zmq_subscriber.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/helpers/contributor_helper.py b/helpers/contributor_helper.py index ae446c6..42ff5cf 100644 --- a/helpers/contributor_helper.py +++ b/helpers/contributor_helper.py @@ -33,7 +33,7 @@ class Contributor_helper: logPath = os.path.join(logDir, logfilename) if not os.path.exists(logDir): os.makedirs(logDir) - logging.basicConfig(filename=logPath, filemode='w', level=logging.INFO) + logging.basicConfig(filename=logPath, filemode='a', level=logging.INFO) self.logger = logging.getLogger(__name__) #honorBadge diff --git a/helpers/geo_helper.py b/helpers/geo_helper.py index be222a5..8169fe8 100644 --- a/helpers/geo_helper.py +++ b/helpers/geo_helper.py @@ -28,7 +28,7 @@ class Geo_helper: logPath = os.path.join(logDir, logfilename) if not os.path.exists(logDir): os.makedirs(logDir) - logging.basicConfig(filename=logPath, filemode='w', level=logging.INFO) + logging.basicConfig(filename=logPath, filemode='a', level=logging.INFO) self.logger = logging.getLogger(__name__) self.keyCategCoord = "GEO_COORD" diff --git a/helpers/trendings_helper.py b/helpers/trendings_helper.py index 298a43f..b85caca 100644 --- a/helpers/trendings_helper.py +++ b/helpers/trendings_helper.py @@ -26,7 +26,7 @@ class Trendings_helper: logPath = os.path.join(logDir, logfilename) if not os.path.exists(logDir): os.makedirs(logDir) - logging.basicConfig(filename=logPath, filemode='w', level=logging.INFO) + logging.basicConfig(filename=logPath, filemode='a', level=logging.INFO) self.logger = logging.getLogger(__name__) ''' SETTER ''' diff --git a/helpers/users_helper.py b/helpers/users_helper.py index e435b34..c865f21 100644 --- a/helpers/users_helper.py +++ b/helpers/users_helper.py @@ -24,7 +24,7 @@ class Users_helper: logPath = os.path.join(logDir, logfilename) if not os.path.exists(logDir): os.makedirs(logDir) - logging.basicConfig(filename=logPath, filemode='w', level=logging.INFO) + logging.basicConfig(filename=logPath, filemode='a', level=logging.INFO) self.logger = logging.getLogger(__name__) def addTemporary(self, org, timestamp): diff --git a/zmq_dispatcher.py b/zmq_dispatcher.py index 162df4f..09a21fd 100755 --- a/zmq_dispatcher.py +++ b/zmq_dispatcher.py @@ -27,7 +27,7 @@ logfilename = cfg.get('Log', 'filename') logPath = os.path.join(logDir, logfilename) if not os.path.exists(logDir): os.makedirs(logDir) -logging.basicConfig(filename=logPath, filemode='w', level=logging.INFO) +logging.basicConfig(filename=logPath, filemode='a', level=logging.INFO) logger = logging.getLogger('zmq_dispatcher') CHANNEL = cfg.get('RedisLog', 'channel') diff --git a/zmq_subscriber.py b/zmq_subscriber.py index 577afee..ab69e93 100755 --- a/zmq_subscriber.py +++ b/zmq_subscriber.py @@ -18,7 +18,7 @@ logfilename = cfg.get('Log', 'filename') logPath = os.path.join(logDir, logfilename) if not os.path.exists(logDir): os.makedirs(logDir) -logging.basicConfig(filename=logPath, filemode='w', level=logging.INFO) +logging.basicConfig(filename=logPath, filemode='a', level=logging.INFO) logger = logging.getLogger('zmq_subscriber') ZMQ_URL = cfg.get('RedisGlobal', 'zmq_url')