call site 0 for log.default.__init__
log/testing/test_log.py - line 99
97
98
99
100
101
102
103
104
105
106
   def test_multi_consumer(self): 
       l = []
->     py.log.setconsumer("x1", l.append)
       py.log.setconsumer("x1 x2", None) 
       p = py.log.Producer("x1 x2")
       p("hello")
       assert not l
       py.log.Producer("x1")("hello")
       assert l
       assert l[0].content() == "hello"
log/consumer.py - line 78
65
66
67
68
69
70
71
72
73
74
75
76
77
78
   def setconsumer(keywords, consumer): 
       """ create a consumer for a set of keywords """
       # normalize to tuples 
       if isinstance(keywords, str): 
           keywords = tuple(map(None, keywords.split()))
       elif hasattr(keywords, 'keywords'): 
           keywords = keywords.keywords 
       elif not isinstance(keywords, tuple): 
           raise TypeError("key %r is not a string or tuple" % (keywords,))
       if consumer is not None and not callable(consumer): 
           if not hasattr(consumer, 'write'): 
               raise TypeError("%r should be None, callable or file-like" % (consumer,))
           consumer = File(consumer)
->     py.log.Producer(keywords).set_consumer(consumer)