From 4fb77ac8787422169566d613562127acf75a427b Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 6 Nov 2010 01:28:59 -0400 Subject: Logging no longer uses root logger. Each module should now log into its own logger. --- sleekxmpp/xmlstream/matcher/xmlmask.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sleekxmpp/xmlstream/matcher') diff --git a/sleekxmpp/xmlstream/matcher/xmlmask.py b/sleekxmpp/xmlstream/matcher/xmlmask.py index 2967a2af..6ebb437d 100644 --- a/sleekxmpp/xmlstream/matcher/xmlmask.py +++ b/sleekxmpp/xmlstream/matcher/xmlmask.py @@ -6,6 +6,8 @@ See the file LICENSE for copying permission. """ +import logging + from xml.parsers.expat import ExpatError from sleekxmpp.xmlstream.stanzabase import ET @@ -18,6 +20,9 @@ from sleekxmpp.xmlstream.matcher.base import MatcherBase IGNORE_NS = False +log = logging.getLogger(__name__) + + class MatchXMLMask(MatcherBase): """ @@ -97,8 +102,7 @@ class MatchXMLMask(MatcherBase): try: mask = ET.fromstring(mask) except ExpatError: - logging.log(logging.WARNING, - "Expat error: %s\nIn parsing: %s" % ('', mask)) + log.warning("Expat error: %s\nIn parsing: %s" % ('', mask)) if not use_ns: # Compare the element without using namespaces. -- cgit v1.2.3