logging: port to standard Python logging

Use the standard `logging` module to configure logging instead of the
in-house `ipapython.log_manager` module and remove `ipapython.log_manager`.

Disable the logging-not-lazy and logging-format-interpolation pylint
checks.

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Jan Cholasta
2016-09-14 15:45:50 +02:00
committed by Martin Basti
parent 464516489f
commit f62a0fdb90
9 changed files with 152 additions and 1743 deletions

View File

@@ -20,6 +20,7 @@
from __future__ import print_function
from contextlib import contextmanager
import logging
import os
from textwrap import wrap
@@ -28,7 +29,7 @@ from ipalib.plugable import Plugin, API
from ipalib.errors import ValidationError
from ipaplatform.paths import paths
from ipapython import admintool
from ipapython.ipa_log_manager import log_mgr
from ipapython.ipa_log_manager import Filter, root_logger
"""
@@ -507,7 +508,7 @@ class IpaAdvise(admintool.AdminTool):
if not self.options.verbose:
# Do not print connection information by default
logger_name = r'ipa\.ipalib\.plugins\.rpcclient'
log_mgr.configure(dict(logger_regexps=[(logger_name, 'warning')]))
root_logger.addFilter(Filter(logger_name, logging.WARNING))
# With no argument, print the list out and exit
if not self.args: