[BlueBream] "Developer mode is enabled" warning is displayed two times at startup

Baiju M mbaiju at zeomega.com
Sat Mar 27 00:33:08 EDT 2010


On Sat, Mar 27, 2010 at 9:47 AM, Stephan Richter
<stephan.richter at gmail.com> wrote:
> On Saturday 27 March 2010, Baiju M wrote:
>>     Any idea why "Developer mode is enabled" warning is displayed
>> two times at startup.
>
> Most likely two handlers are registered for the root logger.

Thanks for the pointer!

I am getting this warning two times, when I use "debug.ini"
PasteDeploy configuration.  But when I use the "deploy.ini"
PasteDeploy configuration, I am getting this warning only once.

This is the deploy.ini:

[app:main]
use = egg:testp3

[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 8080

[DEFAULT]
# set the name of the zope.conf file
zope_conf = %(here)s/etc/zope.conf

And here is my debug.ini:

[loggers]
keys = root, wsgi

[handlers]
keys = console, accesslog

[formatters]
keys = generic, accesslog

[formatter_generic]
format = %(asctime)s %(levelname)s [%(name)s] %(message)s

[formatter_accesslog]
format = %(message)s

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[handler_accesslog]
class = FileHandler
args = (os.path.join('var', 'log', 'access.log'),
        'a')
level = INFO
formatter = accesslog

[logger_root]
level = INFO
handlers = console

[logger_wsgi]
level = INFO
handlers = accesslog
qualname = wsgi
propagate = 0

[filter:translogger]
use = egg:Paste#translogger
setup_console_handler = False
logger_name = wsgi

[filter-app:main]
# Change the last part from 'ajax' to 'pdb' for a post-mortem debugger
# on the console:
use = egg:z3c.evalexception#ajax
next = zope

[app:zope]
use = egg:testp3
filter-with = translogger

[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 8080

[DEFAULT]
# set the name of the zope.conf file
zope_conf = %(here)s/etc/zope.conf

It looks like PasteDeploy has some "magic" functionality for logging,
with a handler for root logger.

There must be another handler for root logger within one of
the zope.* packages, is it ?

What  we can do here ?

Regards,
Baiju M


More information about the bluebream mailing list