Make debug log less chatty

There is a lot of logs from pyroute2 through privsep. This change
ensures the DEBUG option does not change them to DEBUG too so that
the ovn-bgp-agent logs are not that chatty and do not include
uneeded exceptions at the lower levels that are part of the normal
execution path (such as adding an IP already added)

Change-Id: I5627a5d546740e8797edb5c2c3a6fc6b6598699c
This commit is contained in:
Luis Tomas Bolivar 2023-07-04 07:55:51 +02:00
parent c930d52563
commit 61848561e5

View File

@ -174,6 +174,9 @@ https://docs.openstack.org/oslo.rootwrap/latest/user/usage.html#daemon-mode
]
CONF = cfg.CONF
EXTRA_LOG_LEVEL_DEFAULTS = [
'oslo.privsep.daemon=INFO'
]
logging.register_options(CONF)
@ -188,8 +191,9 @@ def init(args, **kwargs):
def setup_logging():
logging.set_defaults(default_log_levels=logging.get_default_log_levels() +
EXTRA_LOG_LEVEL_DEFAULTS)
logging.setup(CONF, 'bgp-agent')
logging.set_defaults(default_log_levels=logging.get_default_log_levels())
LOG.info("Logging enabled!")