Hi everyone! I use Twisted 16.6.0 and wrote the following simple program:
import sys
from twisted.logger import (Logger, textFileLogObserver)
class MyClass:
log = Logger(namespace = "ad_hoc", observer = textFileLogObserver(sys.stdout))
def __init__(self):
self.log.info("MyClass.__init__ called!")
def __del__(self):
self.log.info("Bye!")
obj = MyClass()
I call it with Python 2.7.13:
python loggertest.py
and get this output:
2017-01-20T12:25:18+0300 [__main__.MyClass#info] MyClass.__init__ called!
2017-01-20T12:25:18+0300 [__main__.MyClass#info] Bye!
I expect the text between ‘[‘ and ‘#’ to be ‘ad_hoc’, but it is auto-generated name instead. Am I doing something wrong or this is a bug?
--
Kind regards, Roman Mescheryakov
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python