如何防止 Python Bottle 向控制台报告每个请求?

How to prevent Python Bottle from reporting every request to the console?

我是 运行 使用 Python Bottle 的服务器。它工作得很好,但它会将它处理的每个请求记录到控制台,这会减慢它的速度。有没有办法指示它将这些日志发送到控制台?

示例代码:

from bottle import route, run
@route('/')
def index():
    return 'Hello, world!'
run(host = 'localhost', port = 8080)

示例输出(每次向 localhost:8080/ 发出请求时我都会得到):

127.0.0.1 - - [06/Jun/2015 11:23:24] "GET / HTTP/1.1" 200 244

quiet 参数添加到 run 调用:

from bottle import route, run

@route('/')
def index():
    return 'Hello, world!'

run(host = 'localhost', port = 8080, quiet=True)

参见API reference