Python: Logging
This commit is contained in:
parent
6b2a2119e9
commit
73bc23d165
|
@ -6,6 +6,7 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
|
||||
from twisted.python import log
|
||||
from twisted.internet import reactor
|
||||
from twisted.web import server, static
|
||||
|
||||
|
@ -17,6 +18,7 @@ root = static.File(sys.argv[2])
|
|||
site = server.Site(root)
|
||||
|
||||
reactor.listenTCP(int(sys.argv[1]), site)
|
||||
log.startLogging(sys.stderr)
|
||||
reactor.run()
|
||||
</source>
|
||||
|
||||
|
|
Loading…
Reference in New Issue