List Info

Thread: log.screen set to False, but I'm still seeing error messages to the screen




log.screen set to False, but I'm still seeing error messages to the screen
country flaguser name
United States
2007-06-15 12:00:17
I have the following code to start a production and
development
environment. If I run the function
start_web_server_production, I
still see INFO statements on the screen. I'm using log.scren
but that
does not seem to work in my case. Any idea on what I'm doing
wrong?

Thanks,

Vineet

def start_web_server_production(blocking=True):
    conf = {
        'server.environment':'production',
        'engine.autoreload.on':False,
        'show_tracebacks': True,
        'log_debug_info_filter.on':False,
        'log.screen': False,
    }
    start_web_server_base(conf, blocking)

def start_web_server_development(blocking=True):
    conf = {
        'server.environment':'development',
        'show_tracebacks': True,
        'log_debug_info_filter.on':True,
        'log.screen': True,
    }
    start_web_server_base(conf, blocking)

def start_web_server_base(conf, blocking):
    conf['base_url_filter.on'] = True
    conf['tools.gzip.on'] = False
    conf['tools.log_tracebacks.on'] = True
    conf['protocol_version'] = 'HTTP/1.1'
    conf['log.error_file'] = config.LOGGING_DIR +
"cp.log"
    conf['log.access_file'] =  config.LOGGING_DIR +
"cp_access.log"

    root = views.index.IndexPage()
    try:
        cherrypy.tree.mount(root)
        cherrypy.config.update(conf)
        cherrypy.server.quickstart()
        cherrypy.engine.start(blocking=blocking)
    except:
        print format_exc()
        logging.exception(format_exc())
        logging.exception("Login:: cherrypy was not
ready trying to
restart it")


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


Re: log.screen set to False, but I'm still seeing error messages to the screen
country flaguser name
United States
2007-06-15 13:20:15
pytrade wrote:
> log.screen set to False, but I'm still seeing error
messages to the screen

CherryPy 3 always has at least 2 logs: one for each
Application,
and one for the site as a whole. It looks like you've turned
off
screen logging for the site log (via config.update), but
you
haven't turned off screen logging for the application (via
tree.mount(..., config)). This might explain why you're
still
seeing screen messages--try setting log.screen to False in
your
app config.


Robert Brewer
System Architect
Amor Ministries
fumanchuamor.org

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


  
Re: log.screen set to False, but I'm still seeing error messages to the screen
country flaguser name
United States
2007-06-15 14:30:20
I changed:

        cherrypy.tree.mount(root)

to:

        cherrypy.tree.mount(root, "/",
{"/":conf})

but still see the log messages on the screen.

Thanks,

Vineet


On Jun 15, 2:20 pm, "Robert Brewer"
<fuman...amor.org> wrote:
> pytrade wrote:
> > log.screen set to False, but I'm still seeing
error messages to the screen
>
> CherryPy 3 always has at least 2 logs: one for each
Application,
> and one for the site as a whole. It looks like you've
turned off
> screen logging for the site log (via config.update),
but you
> haven't turned off screen logging for the application
(via
> tree.mount(..., config)). This might explain why you're
still
> seeing screen messages--try setting log.screen to False
in your
> app config.
>
> Robert Brewer
> System Architect
> Amor Ministries
> fuman...amor.org
>
>  winmail.dat
> 4KDownload


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


Re: log.screen set to False, but I'm still seeing error messages to the screen
country flaguser name
United States
2007-06-16 02:29:32
pytrade wrote:
> I have the following code to start a production and
development
> environment. If I run the function
start_web_server_production, I
> still see INFO statements on the screen. I'm using
log.scren but that
> does not seem to work in my case. Any idea on what I'm
doing wrong?
>
> Thanks,
>
> Vineet
>
> def start_web_server_production(blocking=True):
>     conf = {
>         'server.environment':'production',
>         'engine.autoreload.on':False,
>         'show_tracebacks': True,
>         'log_debug_info_filter.on':False,
>         'log.screen': False,
>     }
>     start_web_server_base(conf, blocking)
>
> def start_web_server_development(blocking=True):
>     conf = {
>         'server.environment':'development',
>         'show_tracebacks': True,
>         'log_debug_info_filter.on':True,
>         'log.screen': True,
>     }
>     start_web_server_base(conf, blocking)
>
> def start_web_server_base(conf, blocking):
>     conf['base_url_filter.on'] = True
>     conf['tools.gzip.on'] = False
>     conf['tools.log_tracebacks.on'] = True
>     conf['protocol_version'] = 'HTTP/1.1'
>     conf['log.error_file'] = config.LOGGING_DIR +
"cp.log"
>     conf['log.access_file'] =  config.LOGGING_DIR +
"cp_access.log"
>
>     root = views.index.IndexPage()
>     try:
>         cherrypy.tree.mount(root)
>         cherrypy.config.update(conf)
>         cherrypy.server.quickstart()
>         cherrypy.engine.start(blocking=blocking)
>     except:
>         print format_exc()
>         logging.exception(format_exc())
>         logging.exception("Login:: cherrypy was
not ready trying to
> restart it")

There's such an odd mix of config entries and calls above
that I can't
tell what version of CP you're using. CP 3 has no
log_debug_info_filter, for example, but CP 2 had no
server.quickstart.
Which version are you using? If version 3, please check the
tables at
http://www.c
herrypy.org/wiki/UpgradeTo30 for upgrading all of your
config entries.

Also, are you using TurboGears? TG has its own logging
solution, and
you might be seeing *those* messages on screen.


Robert Brewer
System Architect
Amor Ministries
fumanchuamor.org


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


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )