Moved initial print statement inside start method to make sure that it's properly caught by the logging configuration

This commit is contained in:
Fabio Manganiello 2019-01-03 13:09:12 +00:00
parent 240abb627d
commit cb13098c4f

View file

@ -138,6 +138,8 @@ class Daemon:
def start(self): def start(self):
""" Start the daemon """ """ Start the daemon """
print('---- Starting platypush v.{}'.format(__version__))
redis_conf = Config.get('backend.redis') redis_conf = Config.get('backend.redis')
if redis_conf: if redis_conf:
self.bus = RedisBus(on_message=self.on_message(), self.bus = RedisBus(on_message=self.on_message(),
@ -175,7 +177,6 @@ def main():
sys.stdout = Logger(LOGGER.info) sys.stdout = Logger(LOGGER.info)
sys.stderr = Logger(LOGGER.warning) sys.stderr = Logger(LOGGER.warning)
print('Starting platypush v.{}'.format(__version__))
app = Daemon.build_from_cmdline(sys.argv[1:]) app = Daemon.build_from_cmdline(sys.argv[1:])
app.start() app.start()