On 1/12/06, Vladimir Blagojevic <[EMAIL PROTECTED]> wrote:
> (1) cherrypy
>
> It apparently uses its own logging and configuration. We can get rid of
> it by doing something like:
>
> import cherrypy
> cherrypy.config.update({'server.logToScreen': False})

You can also set that in your config file. prod.cfg has that set to False.

> (2) TurboGears logging
>
> It's using python logging module. The problem is that we can not change
> the configuration of the logging, because in startup.py we see:
>
>     if cherrypy.config.get('server.environment') == 'development':
>         log = logging.getLogger()
>         ...
>         handler = logging.StreamHandler(sys.stdout)
>         ...
>         log.addHandler(handler)
>
> So the only option I see there is to do
>
> import cherrypy
> cherrypy.config.update({'server.logToScreen': False,
> 'server.environment': '<something different than development>'})
>
> In cherrypy tests they seem to use 'production'. I'm not sure if that's
> a good idea. Maybe 'testing' can be used instead. At this point I don't
> see the side effects of changing this property.

server.environment = "production" also turns off autoreloading, which
is generally something you want.

TurboGears should probably have *more* logging statements in it (with
appropriate log levels for each one) and that logging should be easily
configured. That's a good topic for a Trac ticket with a 1.0
milestone.

> (3) print statement
>
> In view.py there is a print statement:
>
> print "setting default site"
>
> Nothing we can do about this but to remove it (or change it to
> logging).

I just removed this. It'll be in the next 0.8.x release. (There were
no prints in the 0.9 view.py.)

Kevin

--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Reply via email to