Log any uncaught exception thrown by the service
Change-Id: I0e5fb7e382f465bbffab81ac17c8edfa43f11ede
This commit is contained in:
parent
00f995f5cd
commit
0afbadd3ee
@ -15,18 +15,25 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
from oslo_log import log as oslo_logging
|
||||||
|
|
||||||
from cloudbaseinit import init
|
from cloudbaseinit import init
|
||||||
from cloudbaseinit.utils import log as logging
|
from cloudbaseinit.utils import log as logging
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
LOG = oslo_logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
CONF(sys.argv[1:])
|
CONF(sys.argv[1:])
|
||||||
logging.setup('cloudbaseinit')
|
logging.setup('cloudbaseinit')
|
||||||
|
|
||||||
|
try:
|
||||||
init.InitManager().configure_host()
|
init.InitManager().configure_host()
|
||||||
|
except Exception as exc:
|
||||||
|
LOG.exception(exc)
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user