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. Thanks for your support 2011/3/4 Lance Edgar <[email protected]> > On 3/4/2011 9:17 AM, neurino wrote: > > I triple checked my production.ini and also tried a lot of changes, I > report it below as it is now (only the logging part), no queries are logged. > > The only SA log messages present are tables creation doing setup-app. > > I read somewhere, maybe here on group but can't find it again, that > sqlalchemy has a particular handling of logs to avoid multiplication of > function calls that gives problems with Apache but I'm not sure since I did > not understand if problem was related with mine. > > > Hm, I'm sorry but this stumps me. Perhaps someone else could provide more > insight? > > I just created a fresh project based on Pylons 1.0 (paster create -t > pylons), saying "True" to SQLAlchemy support, and verified that with no > changes in development.ini I was able to see SQL logging both during > setup-app and serve --reload. (I had to add a class and a controller in > order to trigger a query, but those were the only changes I made to the > project.) You might do the same and start comparing what you see between > your existing project and the "empty" one. > > Lance > > > > # Logging configuration > [loggers] > keys = root, routes, sensor, sqlalchemy, importd > > [handlers] > keys = console, accesslog, importdlog > > [formatters] > keys = generic > > [logger_root] > level = INFO > handlers = accesslog > > [logger_routes] > level = INFO > handlers = > qualname = routes.middleware > # "level = DEBUG" logs the route matched and routing variables. > > [logger_sensor] > level = INFO > handlers = > qualname = sensor > > [logger_importd] > level = INFO > handlers = importdlog > qualname = sensor.lib.importutils > propagate = 0 > > [logger_sqlalchemy] > level = INFO > handlers = > qualname = sqlalchemy.engine > # "level = INFO" logs SQL queries. > # "level = DEBUG" logs SQL queries and results. > # "level = WARN" logs neither. (Recommended for production systems.) > > [handler_console] > class = StreamHandler > args = (sys.stderr,) > level = NOTSET > formatter = generic > > [handler_accesslog] > class = handlers.TimedRotatingFileHandler > #TimedRotatingFileHandler(filename[, when[, interval[, backupCount[, > encoding[, delay[, utc]]]]]]) > args = ('/home/neurino/sensor/log/sensor.log', 'midnight', 1, 30, 'utf-8') > level = INFO > formatter = generic > > [handler_importdlog] > class = handlers.TimedRotatingFileHandler > #TimedRotatingFileHandler(filename[, when[, interval[, backupCount[, > encoding[, delay[, utc]]]]]]) > args = ('/home/neurino/sensor/log/importd.log', 'midnight', 1, 30, 'utf-8') > level = INFO > formatter = generic > > [formatter_generic] > format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] > [%(threadName)s] %(message)s > datefmt = %d-%m-%y %H:%M:%S > > Thanks > neurino > > -- > 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. > -- 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.
