]> kaliko git repositories - sid.git/blobdiff - README.rst
Cleanup logging
[sid.git] / README.rst
index 1d724e19729a9b63bcc4922bbb0675cc7aff58da..a64e4b7513aad559b429c4186cb397e3f52e0d9d 100644 (file)
@@ -31,9 +31,13 @@ Here is a plain example::
    # -*- coding: utf-8 -*-
 
    import getpass
+   import logging
    from sid.sid import MUCBot
    from sid.ping import Ping
 
+   logging.basicConfig(level=args.loglevel,
+                       format='%(levelname)-8s %(message)s')
+
    JID = 'bot@example.org'
    ROOM = 'room@conf.example.org'
    # Pay attention: if you join the room with the same account/nick,