[Twisted-Python] Problem with twisted.web log files

Alex Levy mesozoic at polynode.com
Thu Apr 17 10:31:34 EDT 2003

I'm seeing some strange behavior from twisted.web.

After running "mktap web --logfile=web.log ; twistd -nf web.tap", I get the
following traceback:

Traceback (most recent call last):
  File "/home/mesozoic/dev/Twisted/bin/twistd", line 31, in ?
  File "/home/mesozoic/dev/Twisted/twisted/scripts/twistd.py", line 474, in run
  File "/home/mesozoic/dev/Twisted/twisted/scripts/twistd.py", line 390, in runApp
  File "/home/mesozoic/dev/Twisted/twisted/internet/app.py", line 738, in bindPorts
    self._listenerDict[port, interface] = reactor.listenTCP(port, factory, backlog, interface)
  File "/home/mesozoic/dev/Twisted/twisted/internet/default.py", line 244, in listenTCP
  File "/home/mesozoic/dev/Twisted/twisted/internet/tcp.py", line 417, in startListening
  File "/home/mesozoic/dev/Twisted/twisted/internet/protocol.py", line 55, in doStart
  File "/home/mesozoic/dev/Twisted/twisted/protocols/http.py", line 1009, in startFactory
    self.logFile = self._openLogFile(self.logPath)
  File "/home/mesozoic/dev/Twisted/twisted/web/server.py", line 408, in _openLogFile
    return logfile.LogFile(os.path.basename(path), os.path.dirname(path))
  File "/home/mesozoic/dev/Twisted/twisted/python/logfile.py", line 107, in __init__
    BaseLogFile.__init__(self, name, directory, defaultMode)
  File "/home/mesozoic/dev/Twisted/twisted/python/logfile.py", line 38, in __init__
    assert os.path.isdir(self.directory)

This does _not_ happen, however, if I run "mktap web --logfile=./web.log"

This problem has only surfaced recently, although I can't say precisely how
long ago.  I am using Twisted out of CVS.

Alex Levy
WWW: http://mesozoic.geecs.org

"Never let your sense of morals prevent you from doing what is right."
 -- Salvor Hardin, Isaac Asimov's _Foundation_

More information about the Twisted-Python mailing list