Rotate log when process starts
This commit is contained in:
parent
11a81b679a
commit
6a430380f0
@ -52,6 +52,7 @@ handler = logging.handlers.TimedRotatingFileHandler('verifier.log',
|
|||||||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||||
handler.setFormatter(formatter)
|
handler.setFormatter(formatter)
|
||||||
LOG.addHandler(handler)
|
LOG.addHandler(handler)
|
||||||
|
LOG.handlers[0].doRollover()
|
||||||
|
|
||||||
|
|
||||||
def _list_exists(ending_max=None, status=None):
|
def _list_exists(ending_max=None, status=None):
|
||||||
|
@ -44,6 +44,7 @@ handler = logging.handlers.TimedRotatingFileHandler('worker.log',
|
|||||||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||||
handler.setFormatter(formatter)
|
handler.setFormatter(formatter)
|
||||||
LOG.addHandler(handler)
|
LOG.addHandler(handler)
|
||||||
|
LOG.handlers[0].doRollover()
|
||||||
|
|
||||||
|
|
||||||
class NovaConsumer(kombu.mixins.ConsumerMixin):
|
class NovaConsumer(kombu.mixins.ConsumerMixin):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user