Merge "Make config generator aware of 'default_log_levels' override"
This commit is contained in:
commit
b0c63477d1
@ -463,7 +463,7 @@
|
||||
|
||||
# List of package logging levels in logger=LEVEL pairs. This
|
||||
# option is ignored if log_config_append is set. (list value)
|
||||
#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN,taskflow=WARN,keystoneauth=WARN,oslo.cache=INFO,dogpile.core.dogpile=INFO
|
||||
#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
|
||||
|
||||
# Enables or disables publication of error events. (boolean
|
||||
# value)
|
||||
|
@ -19,29 +19,14 @@ from oslo_service import service
|
||||
|
||||
from ironic.common import config
|
||||
from ironic.conf import CONF
|
||||
from ironic.conf import opts
|
||||
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',
|
||||
])
|
||||
opts.update_opt_defaults()
|
||||
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
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
import itertools
|
||||
|
||||
from oslo_log import log
|
||||
|
||||
import ironic.conf
|
||||
|
||||
_default_opt_lists = [
|
||||
@ -78,3 +80,25 @@ def list_opts():
|
||||
:returns: a list of (group, options) tuples
|
||||
"""
|
||||
return _opts
|
||||
|
||||
|
||||
def update_opt_defaults():
|
||||
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',
|
||||
]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user