CherryPy Log.screen?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CherryPy Log.screen?

Patrick Adair

Hello again, here I am with another probably stupid question ;)

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?



Thanks,

Patrick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CherryPy Log.screen?

Christian Wyglendowski-2

On Tue, Nov 25, 2008 at 5:02 PM, Patrick Adair <[hidden email]> 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.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CherryPy Log.screen?

Patrick Adair

Indeed that did; thank you, sir!

Patrick

On Nov 25, 2:13 pm, "Christian Wyglendowski" <[hidden email]>
wrote:

> On Tue, Nov 25, 2008 at 5:02 PM, Patrick Adair <[hidden email]> 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,
>
> Christianhttp://www.dowski.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CherryPy Log.screen?

Ramon Medeiros
Hi guys,

got same issue here. In my project (https://github.com/kimchi-project/wok.git), i'm trying to log only on files, but the cherrypy insists to redirect to screen. 

What i did:

@@ -108,8 +108,11 @@ class Server(object):
 
         # Enable cherrypy screen logging if running environment
         # is not 'production'
+        cherrypy.log.screen = False
+        cherrypy.config.update({'log.screen': False})
         if dev_env:
             cherrypy.log.screen = True
+            cherrypy.config.update({'log.screen': True})
 
         # close standard file handlers because we are going to use a
         # watchedfiled handler, otherwise we will have two file handlers

Is there something i can look too?


On Tuesday, November 25, 2008 at 8:34:31 PM UTC-2, Patrick Adair wrote:
Indeed that did; thank you, sir!

Patrick

On Nov 25, 2:13 pm, "Christian Wyglendowski" <[hidden email]>
wrote:

> On Tue, Nov 25, 2008 at 5:02 PM, Patrick Adair <[hidden email]> 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,
>
> Christianhttp://<a href="http://www.dowski.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.dowski.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHZ9bwE1xZ-RhBj3Y75Oyqe_qR0aw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.dowski.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHZ9bwE1xZ-RhBj3Y75Oyqe_qR0aw&#39;;return true;">www.dowski.com

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
Loading...