Revert the move of the logger setup
As part of the commit 7fd26bf8031041a0e6df261c71101e29e8bf9610, logging was moved to ironic.conf.__init__.py. This seems to be the reason of the config options not being logged anymore. Closes-Bug: #1674707 Change-Id: I566c9383a3979ad8f6373fb5ef918d0e06e3a53f
This commit is contained in:
parent
26bba448a6
commit
b91651151b
@ -14,6 +14,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log
|
||||
from oslo_service import service
|
||||
|
||||
from ironic.common import config
|
||||
@ -23,7 +24,29 @@ from ironic import objects
|
||||
|
||||
def prepare_service(argv=None):
|
||||
argv = [] if argv is None else argv
|
||||
log.register_options(CONF)
|
||||
log.set_defaults(default_log_levels=[
|
||||
'amqp=WARNING',
|
||||
'amqplib=WARNING',
|
||||
'qpid.messaging=INFO',
|
||||
'oslo_messaging=INFO',
|
||||
'sqlalchemy=WARNING',
|
||||
'stevedore=INFO',
|
||||
'eventlet.wsgi.server=INFO',
|
||||
'iso8601=WARNING',
|
||||
'paramiko=WARNING',
|
||||
'requests=WARNING',
|
||||
'neutronclient=WARNING',
|
||||
'glanceclient=WARNING',
|
||||
'urllib3.connectionpool=WARNING',
|
||||
'keystonemiddleware.auth_token=INFO',
|
||||
'keystoneauth.session=INFO',
|
||||
])
|
||||
config.parse_args(argv)
|
||||
# NOTE(vdrok): We need to setup logging after argv was parsed, otherwise
|
||||
# it does not properly parse the options from config file and uses defaults
|
||||
# from oslo_log
|
||||
log.setup(CONF, 'ironic')
|
||||
objects.register_all()
|
||||
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
|
||||
from ironic.conf import agent
|
||||
from ironic.conf import api
|
||||
@ -46,26 +45,6 @@ from ironic.conf import swift
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
log.register_options(CONF)
|
||||
log.set_defaults(default_log_levels=[
|
||||
'amqp=WARNING',
|
||||
'amqplib=WARNING',
|
||||
'qpid.messaging=INFO',
|
||||
'oslo_messaging=INFO',
|
||||
'sqlalchemy=WARNING',
|
||||
'stevedore=INFO',
|
||||
'eventlet.wsgi.server=INFO',
|
||||
'iso8601=WARNING',
|
||||
'paramiko=WARNING',
|
||||
'requests=WARNING',
|
||||
'neutronclient=WARNING',
|
||||
'glanceclient=WARNING',
|
||||
'urllib3.connectionpool=WARNING',
|
||||
'keystonemiddleware.auth_token=INFO',
|
||||
'keystoneauth.session=INFO',
|
||||
])
|
||||
log.setup(CONF, 'ironic')
|
||||
|
||||
agent.register_opts(CONF)
|
||||
api.register_opts(CONF)
|
||||
audit.register_opts(CONF)
|
||||
|
Loading…
x
Reference in New Issue
Block a user