logging: remove object-specific loggers

Remove all object-specific loggers, with the exception of `Plugin.log`,
which is now deprecated. Replace affected logger calls with module-level
logger calls.

Deprecate object-specific loggers in `ipa_log_manager.get_logger`.

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Jan Cholasta
2017-05-23 18:35:57 +02:00
committed by Martin Basti
parent 9d19654cbd
commit ffadcb0414
72 changed files with 1095 additions and 783 deletions

View File

@@ -17,6 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import logging
import re
from ldap import MOD_ADD
from ldap import SCOPE_BASE, SCOPE_ONELEVEL, SCOPE_SUBTREE
@@ -132,6 +133,8 @@ for each user added plus a summary when the default user group is
updated.
""")
logger = logging.getLogger(__name__)
register = Registry()
# USER MIGRATION CALLBACKS AND VARS
@@ -758,10 +761,9 @@ migration process might be incomplete\n''')
truncated = False
entries = []
if truncated:
self.log.error(
'%s: %s' % (
ldap_obj.name, self.truncated_err_msg
)
logger.error(
'%s: %s',
ldap_obj.name, self.truncated_err_msg
)
blacklists = {}