Re: CherryPy Log.screen?

Ramon Medeiros <[email protected]> Fri, 17 Feb 2017 06:21:07 -0800 (PST)
Newsgroups gmane.comp.python.cherrypy
Message-ID <[email protected]>
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" <[email protected]> 
> wrote: 
> > On Tue, Nov 25, 2008 at 5:02 PM, Patrick Adair <[email protected]> 
> 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 unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.