Hello, Does anyone know how to fix this logging "issue" ? (or how to investiguate ?)
Damien ----- Mail original ----- De: "damien accorsi" <[email protected]> À: [email protected] Envoyé: Mardi 10 Décembre 2013 10:15:29 Objet: [TurboGears] Logging through wsgi deployement results in internal server error Hi all, I have a TG 2.3.1 application running as a WSGI application with Apache. The application works fine, and now I'd like to activate application logging. In order to configure the WSGI deployement, I followed the documentation here: http://turbogears.readthedocs.org/en/latest/cookbook/deploy/mod_wsgi.html The problem is that when I activate the logging (by uncommenting "logging.config.fileConfig(APP_CONFIG)"), it results in an internal server error with no explanation at all. I tried updating my logging configuration, the wsgi one without success. (note: this is working as expected when I use gearbox serve --config production.ini) Any Idea ? Here are my files: The WSGI file: APP_CONFIG = "/opt/pod/pboard/production.ini" #Setup logging import logging # THIS FOLLOWING LINE UNCOMMENTED results in internal server errors # logging.config.fileConfig(APP_CONFIG) #Load the application from paste.deploy import loadapp application = loadapp('config:%s' % APP_CONFIG) application.debug = True The .ini logging section: [loggers] keys = root, pboard, sqlalchemy, auth [handlers] keys = console, logfile [formatters] keys = generic, logfileformatter # If you create additional loggers, add them as a key to [loggers] [logger_root] level = DEBUG handlers = logfile [logger_pboard] level = DEBUG handlers = qualname = pboard [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.) # A logger for authentication, identification and authorization # this is repoze.who: [logger_auth] level = WARN handlers = qualname = auth # If you create additional handlers, add them as a key to [handlers] [handler_console] class = StreamHandler args = (sys.stderr,) level = NOTSET formatter = generic [handler_logfile] class=handlers.RotatingFileHandler args=('/var/log/apache2/pod.log', 'a', 1048576, 0) level=DEBUG formatter=logfileformatter # If you create additional formatters, add them as a key to [formatters] [formatter_generic] format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s datefmt = %H:%M:%S [formatter_logfileformatter] #format = %(asctime)s [%(clientip)s]:%(module)s[%(process)d]:%(message)s format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s datefmt = %H:%M:%S The Apache virtual host: <VirtualHost blablabla:80> WSGIProcessGroup pod WSGIDaemonProcess pod user=www-data group=www-data threads=4 python-path=/opt/pod/tg2env/lib/python3.2/site-packages WSGIScriptAlias / /opt/pod/pboard/productionapp.wsgi #Serve static files directly without TurboGears Alias /img /opt/pod/pboard/pboard/public/img/ Alias /favicon.ico /opt/pod/pboard/pboard/public/favicon.ico Alias /css /opt/pod/pboard/pboard/public/css Alias /javascript /opt/pod/pboard/pboard/public/javascript CustomLog /var/log/apache2/pod-access.log combined ErrorLog /var/log/apache2/pod-error.log LogLevel debug </VirtualHost> Thanks for your help. Damien -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears. For more options, visit https://groups.google.com/groups/opt_out.

