[Twisted-Python] Help with log
a at runtel.ru
a at runtel.ru
Mon Jan 25 00:22:09 MST 2016
Hi All!
Tell me how to wait for the start of the log on twistd.
When I start twistd - i see print out in log in stdout.
log.msg("123") now work.
from twisted.application.service import Application
from twisted.python.log import ILogObserver, FileLogObserver
from twisted.python.logfile import DailyLogFile
# from twisted.python import log
from raspberry.raspberry import Raspberry
from raspberry.config import config
application = Application("raspberry")
logfile = DailyLogFile(config["log_file"], config["log_path"])
application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
runner = Raspberry(application, config)
runner.run()
Thanks!
More information about the Twisted-Python
mailing list