Gravatar

Re: CherryPy Log.screen?


On Tue, Nov 25, 2008 at 5:02 PM, Patrick Adair
<patrick.adair@...> wrote:
> I've been messing around with the config files for our CherryPy
> server, and I noticed something odd: say I have my server start script
> at start-server.py, and a config file at tests.conf that is loaded
> when I run my unit tests.
>
> I'm trying to stop CherryPy from filling Eclipse's output console with
> lines of debug output; if I put
> `cherrypy.config.update({'log.screen': False})` in start-server.py,
> then the output is suppressed and everyone is happy. However, if I put
> `log.screen: False` in the config file (tried it in global, '/', and
> other path configs), then it will show me all the output.
>
> My team would infinitely prefer to have all these config options in
> the .conf file instead of the Python script; is there any halp for us?

You should probably have two config files - one for server-wide
settings (like log.screen) and one for the application itself.  You
can pass a config file to cherrypy.config.update just like you pass a
dictionary.

HTH,

Christian
http://www.dowski.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
(Continue reading)

Patrick Adair | 25 Nov 23:34

Re: CherryPy Log.screen?


Indeed that did; thank you, sir!

Patrick

On Nov 25, 2:13 pm, "Christian Wyglendowski" <christ...@...>
wrote:
> On Tue, Nov 25, 2008 at 5:02 PM, Patrick Adair
<patrick.ad...@...> wrote:
> > I've been messing around with the config files for our CherryPy
> > server, and I noticed something odd: say I have my server start script
> > at start-server.py, and a config file at tests.conf that is loaded
> > when I run my unit tests.
>
> > I'm trying to stop CherryPy from filling Eclipse's output console with
> > lines of debug output; if I put
> > `cherrypy.config.update({'log.screen': False})` in start-server.py,
> > then the output is suppressed and everyone is happy. However, if I put
> > `log.screen: False` in the config file (tried it in global, '/', and
> > other path configs), then it will show me all the output.
>
> > My team would infinitely prefer to have all these config options in
> > the .conf file instead of the Python script; is there any halp for us?
>
> You should probably have two config files - one for server-wide
> settings (like log.screen) and one for the application itself.  You
> can pass a config file to cherrypy.config.update just like you pass a
> dictionary.
>
> HTH,
(Continue reading)


Gmane