Add timestamps to nova/placement wait for scripts
Related-bug: #1951577 Change-Id: I5ca99f53540d27b3e7824d22910ddc69cae3c9d0 Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
parent
03010fad3f
commit
dbf5d36fdf
@ -16,6 +16,7 @@
|
||||
import argparse
|
||||
from configparser import ConfigParser
|
||||
import logging
|
||||
import logging.handlers
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
@ -37,8 +38,17 @@ if debug.lower() == 'true':
|
||||
else:
|
||||
loglevel = logging.INFO
|
||||
|
||||
logging.basicConfig(stream=sys.stdout, level=loglevel)
|
||||
LOG = logging.getLogger('nova_wait_for_api_service')
|
||||
LOG_FORMAT = ('%(asctime)s.%(msecs)03d %(levelname)s '
|
||||
'%(name)s %(message)s')
|
||||
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'
|
||||
LOG.handlers.clear()
|
||||
LOG.setLevel(loglevel)
|
||||
LOG.propagate = True
|
||||
formatter = logging.Formatter(fmt=LOG_FORMAT, datefmt=DATE_FORMAT)
|
||||
stream_handler = logging.StreamHandler(sys.stdout)
|
||||
stream_handler.setFormatter(formatter)
|
||||
LOG.addHandler(stream_handler)
|
||||
|
||||
iterations = 60
|
||||
timeout = 10
|
||||
|
@ -16,6 +16,7 @@
|
||||
import argparse
|
||||
from configparser import ConfigParser
|
||||
import logging
|
||||
import logging.handlers
|
||||
import os
|
||||
import socket
|
||||
import sys
|
||||
@ -37,8 +38,17 @@ if debug.lower() == 'true':
|
||||
else:
|
||||
loglevel = logging.INFO
|
||||
|
||||
logging.basicConfig(stream=sys.stdout, level=loglevel)
|
||||
LOG = logging.getLogger('nova_wait_for_compute_service')
|
||||
LOG_FORMAT = ('%(asctime)s.%(msecs)03d %(levelname)s '
|
||||
'%(name)s %(message)s')
|
||||
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'
|
||||
LOG.handlers.clear()
|
||||
LOG.setLevel(loglevel)
|
||||
LOG.propagate = True
|
||||
formatter = logging.Formatter(fmt=LOG_FORMAT, datefmt=DATE_FORMAT)
|
||||
stream_handler = logging.StreamHandler(sys.stdout)
|
||||
stream_handler.setFormatter(formatter)
|
||||
LOG.addHandler(stream_handler)
|
||||
|
||||
iterations = 60
|
||||
timeout = 10
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
from configparser import ConfigParser
|
||||
import logging
|
||||
import logging.handlers
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
@ -39,8 +40,17 @@ if debug.lower() == 'true':
|
||||
else:
|
||||
loglevel = logging.INFO
|
||||
|
||||
logging.basicConfig(stream=sys.stdout, level=loglevel)
|
||||
LOG = logging.getLogger('placement_wait_for_service')
|
||||
LOG_FORMAT = ('%(asctime)s.%(msecs)03d %(levelname)s '
|
||||
'%(name)s %(message)s')
|
||||
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'
|
||||
LOG.handlers.clear()
|
||||
LOG.setLevel(loglevel)
|
||||
LOG.propagate = True
|
||||
formatter = logging.Formatter(fmt=LOG_FORMAT, datefmt=DATE_FORMAT)
|
||||
stream_handler = logging.StreamHandler(sys.stdout)
|
||||
stream_handler.setFormatter(formatter)
|
||||
LOG.addHandler(stream_handler)
|
||||
|
||||
iterations = 60
|
||||
timeout = 10
|
||||
|
Loading…
Reference in New Issue
Block a user