Merge pull request #191 from niphlod/fix/anyserver
fix anyserver with logging and/or profiler
This commit is contained in:
+4
-4
@@ -189,7 +189,7 @@ def run(servername, ip, port, softcron=True, logging=False, profiler=None):
|
|||||||
if logging:
|
if logging:
|
||||||
application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase,
|
application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase,
|
||||||
logfilename='httpserver.log',
|
logfilename='httpserver.log',
|
||||||
profilerfilename=profiler)
|
profiler_dir=profiler)
|
||||||
else:
|
else:
|
||||||
application = gluon.main.wsgibase
|
application = gluon.main.wsgibase
|
||||||
if softcron:
|
if softcron:
|
||||||
@@ -319,8 +319,8 @@ def main():
|
|||||||
parser.add_option('-P',
|
parser.add_option('-P',
|
||||||
'--profiler',
|
'--profiler',
|
||||||
default=False,
|
default=False,
|
||||||
dest='profiler',
|
dest='profiler_dir',
|
||||||
help='profiler filename')
|
help='profiler dir')
|
||||||
servers = ', '.join(x for x in dir(Servers) if not x[0] == '_')
|
servers = ', '.join(x for x in dir(Servers) if not x[0] == '_')
|
||||||
parser.add_option('-s',
|
parser.add_option('-s',
|
||||||
'--server',
|
'--server',
|
||||||
@@ -346,7 +346,7 @@ def main():
|
|||||||
print 'starting %s on %s:%s...' % (
|
print 'starting %s on %s:%s...' % (
|
||||||
options.server, options.ip, options.port)
|
options.server, options.ip, options.port)
|
||||||
run(options.server, options.ip, options.port,
|
run(options.server, options.ip, options.port,
|
||||||
logging=options.logging, profiler=options.profiler)
|
logging=options.logging, profiler=options.profiler_dir)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user