On 3/4/2011 10:29 AM, neurino wrote:
I will try but I also get log messagges with `paster serve`.

It's when deployed on Apache2.2 with mod_wsgi (as stared in pylonsbook) that I don't get them.

I will try going further creating a fresh project and deploying as a parallel site on my ubuntu server and switch mod_wsgi to it.

Anyway Apache settings cannot influence pylons app logging right?

I can post messages to the same log file from controllers, I also can log from a daemon running in external thread but changing level in [logger_sqlalchemy]does not make any difference.

Sorry, I didn't realize the problem was limited to Apache/mod_wsgi.  I believe this thread contains some helpful info.  Apparently the logging configuration is normally done by paster and not e.g. pylons itself.  The solution then is to modify your WSGI script to do the configuration.  Here's my example, which worked for me:


#!/usr/bin/env python

import site
site.addsitedir('/home/lance/.virtualenvs/pylons_test/lib/python2.6/site-packages')

import logging.config
logging.config.fileConfig('/home/lance/.virtualenvs/pylons_test/src/pylons_test/development.ini')

from paste.deploy import loadapp
application = loadapp('config:/home/lance/.virtualenvs/pylons_test/src/pylons_test/development.ini')



Lance

--
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