Exemplo n.º 1
0
 def __init__(self, queue=None, logging_url="", channel="", username="",
              icon_emoji = ""):
     QueueListener.__init__(self,queue)
     Handler.__init__(self)
     """
     logging_url, channel, username, icon_emoji can all be overridden
     by the extra dictionary parameter of a logging record
     For example: 
         logging.info('Test messate',extra={'channel':'@someone',
                                            'username':'******',
                                            'icon_emoji':':penguin:'})
     """
     self.logging_url = logging_url
     self.payload = {
         "channel": channel,
         "username": username,
         "icon_emoji": icon_emoji
         }
Exemplo n.º 2
0
 def __init__(self,
              queue=None,
              logging_url="",
              channel="",
              username="",
              icon_emoji=""):
     QueueListener.__init__(self, queue)
     Handler.__init__(self)
     """
     logging_url, channel, username, icon_emoji can all be overridden
     by the extra dictionary parameter of a logging record
     For example: 
         logging.info('Test messate',extra={'channel':'@someone',
                                            'username':'******',
                                            'icon_emoji':':penguin:'})
     """
     self.logging_url = logging_url
     self.payload = {
         "channel": channel,
         "username": username,
         "icon_emoji": icon_emoji
     }