Merge "Revert the move of the logger setup"

This commit is contained in:
Jenkins 2017-03-22 14:58:10 +00:00 committed by Gerrit Code Review
commit abffba8eb9
2 changed files with 23 additions and 21 deletions
ironic

@ -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)