0

I would like to disable the logging in this picture (in the red box):

enter image description here

I use turbogears 2.3.7. When I start gearbox server and access my url http://localhost:8778. in log will show access url.

For example:

127.0.0.1 - - [11/Mar/2016 16:59:06] "GET /css/bootstrap.min.css HTTP/1.1" 304 0
127.0.0.1 - - [11/Mar/2016 16:59:06] "GET /css/style.css HTTP/1.1" 304 0
127.0.0.1 - - [11/Mar/2016 16:59:06] "GET /css/style.css HTTP/1.1" 304 0
127.0.0.1 - - [11/Mar/2016 16:59:06] "GET /css/style.css HTTP/1.1" 304 0
Martin Evans
  • 45,791
  • 17
  • 81
  • 97
padungrat
  • 1
  • 2

1 Answers1

4

This is caused by the fact that you are serving app with the wsgiref server. You can see that by the fact that you have use = egg:gearbox#wsgiref inside your [server:main] section of the development.ini file.

The wsgiref server, being only meant for development doesn't have a proper logging configuration, and just outputs everything to stderr.

If you want to manage logging you can switch to a better suited server like Waitress.

Just pip install waitress and then in your development.ini put something like:

[server:main]
use = egg:waitress#main

in place of

[server:main]
use = egg:gearbox#wsgiref
amol
  • 1,771
  • 1
  • 11
  • 15