Clean up logging a little bit

This commit is contained in:
Pim van Pelt
2022-03-24 12:14:26 +00:00
parent b43d7903fd
commit 8129235031
9 changed files with 32 additions and 51 deletions

View File

@ -14,11 +14,6 @@
import logging
import validator.interface as interface
class NullHandler(logging.Handler):
def emit(self, record):
pass
def get_by_name(yaml, ifname):
""" Return the BondEthernet by name, if it exists. Return None,None otherwise. """
try:
@ -52,7 +47,7 @@ def validate_bondethernets(yaml):
result = True
msgs = []
logger = logging.getLogger('vppcfg.validator')
logger.addHandler(NullHandler())
logger.addHandler(logging.NullHandler())
if not 'bondethernets' in yaml:
return result, msgs