Paste server does special stuff to initialise the environment for logging. Arguably it shouldn't do this and any such initialisation should be a side effect of getting the root WSGI application object.
What it means is that you have to perform the same initialisation somehow when using mod_python. For discussion of how to do that for mod_wsgi see: http://groups.google.com/group/pylons-discuss/browse_thread/thread/9b9add4529b3779c You will have to work out how to do the same for mod_python. Graham On Dec 9, 7:20 am, D D <[email protected]> wrote: > Hi, > I have a pylons app, and everything works fine with running via Paster > serve. > However, I have deployed it using mod_python, and I am not able to get it to > print any logs anywhere. > > I don't get any logs in chainsaw, console (apache's error_log) or in the > specified log file (/var/log/mysite.log). This only happens when I run it > via mod_python, everything works fine while running through paster serve. > I do get exceptions in apache error_log when there is an exception/crash for > the site. > > Below are the relevant parts for logging: > > # Logging configuration > [loggers] > keys = root, routes, mysite, sqlalchemy, mako, secure > > [handlers] > keys = console, chainsaw, mysitelog > > [formatters] > keys = generic, xmllayout > > [logger_root] > level = DEBUG > handlers = console, chainsaw, mysitelog > > [logger_routes] > level = INFO > handlers = > qualname = routes.middleware > > [logger_mysite] > level = DEBUG > handlers = > qualname = mysite > > [logger_sqlalchemy] > level = DEBUG > handlers = > qualname = sqlalchemy.engine > > [logger_mako] > level = DEBUG > handlers = > qualname = pylons.templating > > [logger_secure] > level = DEBUG > handlers = > qualname = pylons.decorators.secure > > [handler_console] > class = StreamHandler > args = (sys.stderr,) > level = NOTSET > formatter = generic > > [handler_chainsaw] > class = xmllayout.RawSocketHandler > args = ('localhost', 4445) > level = NOTSET > formatter = xmllayout > > [handler_mysitelog] > class = FileHandler > args = ('/var/log/mysite.log','a') > level = DEBUG > formatter = generic > > [formatter_generic] > format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s > datefmt = %H:%M:%S > > [formatter_xmllayout] > class = xmllayout.XMLLayout > > Any suggestions on where to start debugging this? I am generally pretty new > to mod_python, so any pointers will help. > Thanks, > DD. -- 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.
