summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/matcher/xmlmask.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-11-06 01:28:59 -0400
committerLance Stout <lancestout@gmail.com>2010-11-06 01:28:59 -0400
commit4fb77ac8787422169566d613562127acf75a427b (patch)
treec0c0f095c7c7cd2f701c85462e768b214657e072 /sleekxmpp/xmlstream/matcher/xmlmask.py
parentd0c506f93010f62cd447ce29f98ab991f521ec99 (diff)
downloadslixmpp-4fb77ac8787422169566d613562127acf75a427b.tar.gz
slixmpp-4fb77ac8787422169566d613562127acf75a427b.tar.bz2
slixmpp-4fb77ac8787422169566d613562127acf75a427b.tar.xz
slixmpp-4fb77ac8787422169566d613562127acf75a427b.zip
Logging no longer uses root logger.
Each module should now log into its own logger.
Diffstat (limited to 'sleekxmpp/xmlstream/matcher/xmlmask.py')
-rw-r--r--sleekxmpp/xmlstream/matcher/xmlmask.py8
1 files changed, 6 insertions, 2 deletions
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.