Hi pylons-discuss,

I followed the instructions in
http://pylonshq.com/docs/en/1.0/logging/#request-logging-with-paste-s-translogger
to add a logging filter to development.ini and then my unit tests
broke:

  File "/home/nadav/Development/myproj/myproj/tests/__init__.py", line
29, in <module>
    [pylons.test.pylonsapp.config['__file__']])
AttributeError: 'TransLogger' object has no attribute 'config'

After a little investigation, It turns out by adding the filter,
pylonsapp becomes the filter and not the app, so in an attempt to make
it work I changed tests/__init__.py from

SetupCommand('setup-
app').run([pylons.test.pylonsapp.config['__file__']])
to
SetupCommand('setup-
app').run([pylons.test.pylonsapp.application.config['__file__']])

(so it finds the real pylons app). Then, I got the following
exception:

  File "/home/nadav/py26pylons/lib/python2.6/site-packages/
PasteScript-1.7.3-py2.6.egg/paste/script/appinstall.py", line 453, in
command
    "The section %r is not the application (probably a filter).  You
should add #section_name, where section_name is the section that
configures your application" % plain_section)
BadCommand: The section 'main' is not the application (probably a
filter).  You should add #section_name, where section_name is the
section that configures your application


If I remove the TransLogger from development.ini it all works, but I
want it there. Is there any way to fix it? Can I make test.ini use
development.ini but override the TransLogger filter?

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

Reply via email to