Improve debug logging
* Update default log levels * Make iptables logging more compact by removing newlines * Enable debug logging in devstack plugin by default Change-Id: I2af558078cb27edb5f162372d52c048f0e659079
This commit is contained in:
parent
c45ba39ec3
commit
0533f463fd
@ -1,4 +1,4 @@
|
|||||||
IRONIC_INSPECTOR_DEBUG=${IRONIC_INSPECTOR_DEBUG:-false}
|
IRONIC_INSPECTOR_DEBUG=${IRONIC_INSPECTOR_DEBUG:-True}
|
||||||
IRONIC_INSPECTOR_DIR=$DEST/ironic-inspector
|
IRONIC_INSPECTOR_DIR=$DEST/ironic-inspector
|
||||||
IRONIC_INSPECTOR_BIN_DIR=$(get_python_exec_prefix)
|
IRONIC_INSPECTOR_BIN_DIR=$(get_python_exec_prefix)
|
||||||
IRONIC_INSPECTOR_BIN_FILE=$IRONIC_INSPECTOR_BIN_DIR/ironic-inspector
|
IRONIC_INSPECTOR_BIN_FILE=$IRONIC_INSPECTOR_BIN_DIR/ironic-inspector
|
||||||
|
@ -41,11 +41,12 @@ def _iptables(*args, **kwargs):
|
|||||||
try:
|
try:
|
||||||
subprocess.check_output(cmd, **kwargs)
|
subprocess.check_output(cmd, **kwargs)
|
||||||
except subprocess.CalledProcessError as exc:
|
except subprocess.CalledProcessError as exc:
|
||||||
|
output = exc.output.replace('\n', '. ')
|
||||||
if ignore:
|
if ignore:
|
||||||
LOG.debug('ignoring failed iptables %s:\n%s', args, exc.output)
|
LOG.debug('Ignoring failed iptables %s: %s', args, output)
|
||||||
else:
|
else:
|
||||||
LOG.error(_LE('iptables %(iptables)s failed:\n%(exc)s') %
|
LOG.error(_LE('iptables %(iptables)s failed: %(exc)s') %
|
||||||
{'iptables': args, 'exc': exc.output})
|
{'iptables': args, 'exc': output})
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
@ -367,14 +367,18 @@ def create_ssl_context():
|
|||||||
def main(args=sys.argv[1:]): # pragma: no cover
|
def main(args=sys.argv[1:]): # pragma: no cover
|
||||||
log.register_options(CONF)
|
log.register_options(CONF)
|
||||||
CONF(args, project='ironic-inspector')
|
CONF(args, project='ironic-inspector')
|
||||||
debug = CONF.debug
|
|
||||||
|
|
||||||
log.set_defaults(default_log_levels=[
|
log.set_defaults(default_log_levels=[
|
||||||
'urllib3.connectionpool=WARN',
|
'sqlalchemy=WARNING',
|
||||||
'keystonemiddleware.auth_token=WARN',
|
'keystoneclient=INFO',
|
||||||
'requests.packages.urllib3.connectionpool=WARN',
|
'iso8601=WARNING',
|
||||||
('ironicclient.common.http=INFO' if debug else
|
'requests=WARNING',
|
||||||
'ironicclient.common.http=ERROR')])
|
'urllib3.connectionpool=WARNING',
|
||||||
|
'keystonemiddleware=WARNING',
|
||||||
|
'swiftclient=WARNING',
|
||||||
|
'keystoneauth=WARNING',
|
||||||
|
'ironicclient=WARNING'
|
||||||
|
])
|
||||||
log.setup(CONF, 'ironic_inspector')
|
log.setup(CONF, 'ironic_inspector')
|
||||||
|
|
||||||
app_kwargs = {'host': CONF.listen_address,
|
app_kwargs = {'host': CONF.listen_address,
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
other:
|
||||||
|
- Make debug-level logging more compact by removing newlines from firewall
|
||||||
|
logging and disabling some 3rdparty debug messages by default.
|
Loading…
Reference in New Issue
Block a user