Merge pull request #255 from anton-ryzhov/logging
Add null handler to logging engine
This commit is contained in:
commit
e60401278f
1 changed files with 11 additions and 0 deletions
|
@ -6,6 +6,17 @@
|
||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
|
if hasattr(logging, 'NullHandler'):
|
||||||
|
NullHandler = logging.NullHandler
|
||||||
|
else:
|
||||||
|
class NullHandler(logging.Handler):
|
||||||
|
def handle(self, record):
|
||||||
|
pass
|
||||||
|
logging.getLogger(__name__).addHandler(NullHandler())
|
||||||
|
del NullHandler
|
||||||
|
|
||||||
|
|
||||||
from sleekxmpp.stanza import Message, Presence, Iq
|
from sleekxmpp.stanza import Message, Presence, Iq
|
||||||
from sleekxmpp.jid import JID, InvalidJID
|
from sleekxmpp.jid import JID, InvalidJID
|
||||||
from sleekxmpp.xmlstream.stanzabase import ET, ElementBase, register_stanza_plugin
|
from sleekxmpp.xmlstream.stanzabase import ET, ElementBase, register_stanza_plugin
|
||||||
|
|
Loading…
Reference in a new issue