
from oslo_config import cfg

from zaqar import bootstrap

# Use the global CONF instance
conf = cfg.CONF
conf(project='zaqar', prog='zaqar-queues', args=[])

boot = bootstrap.Bootstrap(conf)
conf.drivers.transport = 'wsgi'
app = boot.transport.app


from oslo_config import cfg
from oslo_log import log

from zaqar import bootstrap

# Use the global CONF instance
conf = cfg.CONF
log.register_options(conf)
conf(project='zaqar', prog='zaqar-queues', args=[])
log.setup(conf, 'zaqar')

boot = bootstrap.Bootstrap(conf)
conf.drivers.transport = 'wsgi'
app = boot.transport.app

Make the log work when deploy Zaqar with uwsgi
Make the log work when deploy Zaqar with uwsgi

The zaqar-wsgi runs under uwsgi by devstack can't
print any WARNING, DEBUG, ERROR or INFO log now.

This path add the log initialization for uwsgi boot.

Change-Id: Ifcd6be908442275d2acbde2562e593b2ca87b277
Cloese-bug: #1645492

  
  from oslo_config import cfg
+ from oslo_log import log
  
  from zaqar import bootstrap
  
  # Use the global CONF instance
  conf = cfg.CONF
+ log.register_options(conf)
  conf(project='zaqar', prog='zaqar-queues', args=[])
+ log.setup(conf, 'zaqar')
  
  boot = bootstrap.Bootstrap(conf)
  conf.drivers.transport = 'wsgi'
  app = boot.transport.app
  
Make the log work when deploy Zaqar with uwsgi
## Code Before:

from oslo_config import cfg

from zaqar import bootstrap

# Use the global CONF instance
conf = cfg.CONF
conf(project='zaqar', prog='zaqar-queues', args=[])

boot = bootstrap.Bootstrap(conf)
conf.drivers.transport = 'wsgi'
app = boot.transport.app

## Instruction:
Make the log work when deploy Zaqar with uwsgi
## Code After:

from oslo_config import cfg
from oslo_log import log

from zaqar import bootstrap

# Use the global CONF instance
conf = cfg.CONF
log.register_options(conf)
conf(project='zaqar', prog='zaqar-queues', args=[])
log.setup(conf, 'zaqar')

boot = bootstrap.Bootstrap(conf)
conf.drivers.transport = 'wsgi'
app = boot.transport.app
